Add chmod notes
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
Symbolic mode:
|
||||
chmod who-+=permission filename
|
||||
"who-+=permission" section can be repeated for different combos with a comma ,
|
||||
|
||||
who:
|
||||
u - user
|
||||
g - group
|
||||
o - other
|
||||
a - all
|
||||
|
||||
permissions:
|
||||
r - read
|
||||
w - write
|
||||
x - execute
|
||||
X - execute only if the file is a directory or already has execute permission for some user
|
||||
s - set user or group ID on execution (????)
|
||||
t - sticky bit (????)
|
||||
|
||||
chmod u=rwx,g=rx,o-rwx filename
|
||||
|
||||
|
||||
|
||||
Number mode
|
||||
chmod user_permission..group_permission..other_permission filename
|
||||
0 <= permission <= 7
|
||||
|
||||
permissions:
|
||||
>>> for i in range (8):
|
||||
... print(i, bin(i))
|
||||
...
|
||||
0 0b000
|
||||
1 0b001
|
||||
2 0b010
|
||||
3 0b011
|
||||
4 0b100
|
||||
5 0b101
|
||||
6 0b110
|
||||
7 0b111
|
||||
n __rwx
|
||||
|
||||
chmod 754 filename
|
||||
binary breakdown:
|
||||
chmod 111 101 100 filename
|
||||
Reference in New Issue
Block a user