Changes

Jump to: navigation, search
File Permissions
You can use '''octal numbers''' to represent permissions.
Since 1 octal digit represents 3 binary digits, one octal digit can represent the rwx permission granted or NOT granted. The permissions rwz would be in the form of 3 binary digits (1 represents the permission granted and 0 represents the permission NOT granted.<br>x<br>x<br>You can only use this method to '''set''' file permissions (as opposed to ''add'' or ''remove'' permissions).
<table cellpadding="5" width="70%"><tr><th style="border-bottom: 1px solid black;text-align:left;">Command</th><th style="border-bottom: 1px solid black;text-align:left;">Description</th></tr><tr valign="top"><td width="40%"><span style="font-family:courier;font-weight:bold;">chmod ugo+x script.bash</span></td><td>Add execute permissions to the file '''script.bash''' so it can be run.</tr><tr valign="top"><td><span style="font-family:courier;font-weight:bold">chmod u=rwx,go=x ~</span></td><td>Set "'''pass-thru'''" permissions of your '''home''' directory for same group members and other group members to navigate to other subdirectories (that may have access / view permissions).</tr><tr valign="top"><td><span style="font-family:courier;font-weight:bold;">chmod go-w ~/shared</span></td><td>Remove write permissions for same group members and other group members for the directory '''~/shared'''</td></tr><tr valign="top"><td><span style="font-family:courier;font-weight:bold;">chmod a=rx my</span></td><td>Set read and execute permissions for the directory '''myfile.txt'''</td></tr></table>
13,420
edits

Navigation menu