Changes

Jump to: navigation, search
File Permissions
The chmod can use '''symbols''' to ''add'', ''remove'', and ''set'' <span style="font-family:courier;font-weight:bold;">rwx</span> permissions for the '''user''',<br>'''same group members''', and/or o'''ther group members''' for a directory or reqular file.
 <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[[Image:courier;fontsymbolic-weight:bold;">chmod ugo+x scriptchart.bash</span></td><td>Add execute png|thumb|right|250px|Examples of adding, removing and setting permissions to using 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 command with the directory '''~/sharedSymbolic'''</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 '''myfilemethod.txt'''</td></tr></table>]]
'''<span style="font-style:italic">Octal (Absolute) Method:</span>'''
Since 1 octal digit represents 3 binary digits, one octal digit can represent the <span style="font-family:courier;font-weight:bold;">rwx</span> permission granted or NOT granted. The permissions '''rwx''' are be in the form of 3 binary digits (1 represents the permission granted and 0 represents the permission NOT granted).
  <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[[Image:courier;fontabsolute-weight:bold;">chmod 500 scriptchart.bash</span></td><td>Set read png|thumb|right|250px|Examples of adding, removing and execute setting permissions for only using the '''user''' for the file '''script.bash''' so it can be run.</tr><tr valign="top"><td><span style="font-family:courier;font-weight:bold">chmod 711 ~</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 750 ~/shared</span></td><td>Set full permissions for user, read and access permissions for some group members and no permissions for other group members for command with the directory '''~Absolute /sharedOctal'''</td></tr><tr valign="top"><td><span style="font-family:courier;font-weight:bold;">chmod 555 myfile.txt</span></td><td>Set read and execute permissions for the directory '''myfilemethod.txt'''</td></tr></table>]]
'''NOTE:''' You can use the '''-R''' option to set permissions for directory, subdirectory and directory contents '''recursively'''.
13,420
edits

Navigation menu