Advertisement
alice_killer

ACL Linux

Apr 19th, 2024 (edited)
575
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.46 KB | None | 0 0
  1. sudo chattr +i log.txt - make it unremovable
  2. lsattr log.txt - to check for the attribute {
  3. In normal files -> `e` attribute
  4. in unremovable -> `i` attribute
  5. `a` - you cannot edit the data, but you can extend the data (to put something new in the file)
  6. }
  7. sudo chattr -i log.txt - to remove the attribute
  8.  
  9.  
  10. Sticky bit
  11. ls -l /tmp
  12. rwx rwx rwt -t sticky bit - Unless you have 'w' right you cannot remove and edit the files of different users in you aren't root
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement