scor32k

file permission linux

Jul 28th, 2023
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. chmod 400
  2.  
  3. chmod -> this is used to change the file permission
  4.  
  5. 400 is the rule where this 400 is divided into 3 groups
  6.  
  7. --------------------------
  8.  
  9. file permission on linux are *read, write and execute*
  10.  
  11. number accocated to the permissions are
  12.  
  13. read -> 4
  14. write -> 2
  15. excute -> 1
  16.  
  17.  
  18. so the most we can give permisssion to any file is *777*
  19.  
  20. 7 7 7
  21. (4+2+1) . .
  22. user group others
  23. user can read write, excute file group -*- others -*-
  24.  
  25. here we have 400
  26.  
  27. 4 0 0
  28. user group others
  29.  
  30. means
  31.  
  32. the owner of the file can read only /- no other permission to group or others.
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
Advertisement
Add Comment
Please, Sign In to add comment