less than 1 minute read

1. permission

1-1 read, write, execute

regular file directory special file
read(r) read or copy read(list its contains) read by system call
write(w) change or delete add or remove its contains written by system call
execute(x) execute if program access, reference, move no meaning

it also refered as octal number

r w x
digit 4 digit 2 digit 1



2. change mode

chmod mode file
  • symbolic mode
who
u user
g guest
o other
a all
operation
= assign
+ add permission
- remove permission
chmod u=rwx,g+w,o-w file1
  • octal
chmod 755 file1

  the above command changes file1 with permision rwxr_xr_x.



3. user mask

set file/directory under working directory with complementary permission(only in octal)

umask 026
Maskdirectoryfile(not functioning in 'x')
0rwx(7)rw_(6)
1rw_(6)rw_(6)
2r_x(5)r__(4)
3r__(4)r__(4)
4_wx(3)_w_(2)
5_w_(2)_w_(2)
6__x(1)___(0)
7___(-)___(0)

Categories:

Updated:

Leave a comment