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
who |
u |
user |
g |
guest |
o |
other |
a |
all |
operation |
= |
assign |
+ |
add permission |
- |
remove permission |
chmod u=rwx,g+w,o-w 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)
Mask | directory | file(not functioning in 'x') |
0 | rwx(7) | rw_(6) |
1 | rw_(6) | rw_(6) |
2 | r_x(5) | r__(4) |
3 | r__(4) | r__(4) |
4 | _wx(3) | _w_(2) |
5 | _w_(2) | _w_(2) |
6 | __x(1) | ___(0) |
7 | ___(-) | ___(0) |
Leave a comment