Kamis, 06 November 2014

CHMOD Linux Command (numeric mode)

After we read about chmod octal mode, this time we will change right akases or chmod files / folders using a numeric mode. Actual numeric mode is almost similar to the calculation of the octal mode. Numeric mode refers to the following table:

 through the table we can determine what number should we fill in to change the access rights according to our wishes.
for example:
note the blue line below.

The distribution of access rights.

 drwxr-xr-x 2 root root   4096 Nov  5 20:48 cdebconf




 
The blue colored lines declare the permissions of a directory.
Now we will change the access rights on a calculation using numeric mode table above.
As in the calculation of octal mode, the access rights will now be divided into three groups, each group having 3 digit number that represents the permissions.

d          rwx          r-x          r-x     2 root root   4096 Nov  5 20:48 cdebconf
          group-1       group-2       group-3
                user           group           other

 Now we will change the directory access rights are entitled to full access to all its group. Note the calculations in the table above.

typing in a terminal
chmod 777 filename

chmod 777 cdebconf or
chmod 0777 cdebconf

then type :

ls -l
  
drwxrwxrwx 2 root root   4096 Nov  5 20:48 cdebconf
 



prior to the change permissions:
 drwxr-xr-x 2 root root   4096 Nov  5 20:48 cdebconf

after changes permissions :
drwxrwxrwx 2 root root   4096 Nov  5 20:48 cdebconf    

Tidak ada komentar:

Posting Komentar

Related Posts Plugin for WordPress, Blogger...