If you can see this check that

next section prev section up prev page next page

How to change existing permission numerically

You can also specify permissions for chmod using a number, using the format:

chmod number filename
where number is a three-digit number specifying what permissions you want to assign to a file. Each of the three digits sequentially sets permissions for each of the three classes of owner, group, and other. The filename is the name of the file you want to modify. The values for any one digit are derived from adding the value of the permissions from the following list: Notice that if you add all of the values from the values from the list, the result is 7. The number 7 represents read, write, and execute permission values. For read and write permissions only, the value would be (4+2 = 6). Read and execute permissions only would be (4+1 = 5).

For example, again assume 'myfile' has the following default permissions:

-rwxr-----  1 john staff 500 Nov 18 12:25 myfile
If we wish to give the group 'staff' write access to 'myfile' we could use the following command:
% chmod 760 myfile
% ls -l myfile 
-rwxrw----  1 john staff 500 Nov 18 12:25 myfile

Tutlinks: intro1 intro2 wildcard permission pipe vi essential admin net fwall DNS diag Apache1 Apache2 MySQL1 MySQL2
Useful: Quiz Forums
Site Links:XMLZoo ActiveSQL ProgZoo SQLZoo