08 04 2021
ile or directory
permission
r -read
w -write
x -execute
user(owner) group other
user1 group2 other -- student
regular files - r w
executable file -r w x
directories -- r w x
------------
-rw-rw-r--. 1 student student 513 Apr 5 17:46 tf1
user group
rw- rw- r--
user group other
student student root,user1,user2...
chmod
who change the permission on file or directory
owner (user) , root , sudoers.
r -read
w -write
x -execute
-add
-remove
= -replace
a -all (u g o)
u -user
g -group
o -other
--
rw-rw-r- chmod g-w chfile1
rw-r--r-
rw-r---- other users cant read file chmod o-r chfile1
rw-rw--- write permission to group chmod g+w chfile1
rw-rw-rw add read n write to other chmod o+rw chfile1
r--r--r- remove write to all chmod a-w chfile1
rw-r--r- add write to user chmod u+w chfile1
rw--w-r- replace group write chmod g=w chfile1
rw-r-xr- chmod g=rx chfile1
rw-r--r- chmod g=r chfile1
rw-rw-rw add write to group n other chmod go+w chfile1