Chmod Ulitlity
Grant values for permissions
4 read
2 write
1 execute
Order in which permissions are assigned
owner group others
4 + 2 + 1 4 + 2 + 1 4 + 2 + 1
Add the numbers and use the sum with the chmod utlility.
Options
-f does not issue error messages concerning file access permissions, even
if chmod encounters such errors
-R changes the access permissions of all files and subdirectories under a directory
if one is specified as a path name on the command line
Example
chmod 711 koolfile
owner group others
7 1
1
7 sets user permissions to 4 read + 2 write + 1 execute.
1 sets group permissions to 1 execute.
1 sets ohter permissions to 1 execute.
Example
chmod 765 koolfile
owner group others
7 6
5
7 sets user permissions which are 4 read + 2 write + 1 execute.
6 sets group permission which is 4 read + 2 write.
5 sets other permissions, which is 4 read + 1 execute.
Another way to set unix permissions
u sets user (individual) permissions.
g sets group permissions.
o sets other permissions.
a sets all permissions. This is the default
r sets read permissions.
w sets write permissions.
x sets execute permissions.
Examples
chmod u+rwx koolfile
Sets the user permissions to read, write, and execute.
-rwx------ 1 group owner 124 Jun 5 13:28 koolfile