Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo chattr +i log.txt - make it unremovable
- lsattr log.txt - to check for the attribute {
- In normal files -> `e` attribute
- in unremovable -> `i` attribute
- `a` - you cannot edit the data, but you can extend the data (to put something new in the file)
- }
- sudo chattr -i log.txt - to remove the attribute
- Sticky bit
- ls -l /tmp
- rwx rwx rwt -t sticky bit - Unless you have 'w' right you cannot remove and edit the files of different users if you aren't root
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement