a)
1 -> active , 0 -> inactive
b) 4 -> r (read)
c) 2 -> w (write)
d) 1 -> x (execute)
Binary | Decimal | Permission | ||
0 | 0 | 0 | 0 | no permision |
0 | 0 | 1 | 1 | 0 + 0 +execute |
0 | 1 | 0 | 2 | 0 + write + 0 |
0 | 1 | 1 | 3 | 0 + write+execute |
1 | 0 | 0 | 4 | read + 0 + 0 |
1 | 0 | 1 | 5 | read + 0 +execute |
1 | 1 | 0 | 6 | read + write |
1 | 1 | 1 | 7 | read + write+execute |
# chmod 777 file_name [to give all permission to everyone ]
# chmod 000 file_name [to give no permission to anyone ]
# chgrp group_name file_name [ to add a file under a group]
Example:
Group name-> iiuc , User name-> cse & eee , File name-> test
user+cse-> all access and
eee and others -> only read
Process:
# groupadd iiuc
# useradd cse
# passwd cse [type and retype the password]
# useradd eee
# passwd eee [type and retype the password]
# usermod -G iiuc cse
# vi /home/test
# chgrp iiuc /home/test
# chmod 774 /home/test
No comments:
Post a Comment