Basic file permissions are given in form of :

Type      Numerical value
read                        4
write                       2
execute                   1

Setup :

[-/d/l]  [user]  [group]  [others]

File ‘‘   directory ‘d’   links ‘l
Default file permission —– 666
Default directory permission —– 777
Default umask —– 022

umask helps in setting the working permissions of files and directories.

Default =        666
Umask =         022 (subtract)
Permission =   644

Meaning :

Type = ‘file’.
User permission = ‘4+2’ ‘read + write’.
Group permission = ‘4’ ‘read’
Others permission = ‘4’ ‘read’

Permissions can be seen by :

#  ls  -l

Changing permissions :

#  chmod  [permission]  [filename]

Eg. # chmod  777  file1

Advertisements