User Tools

Site Tools


immutable

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
immutable [2015/12/22 19:00] luke7858immutable [2024/05/23 07:26] (current) – external edit 127.0.0.1
Line 1: Line 1:
 === Immutable File Permissions === === Immutable File Permissions ===
 Chattr is a command that can be used to set file attributes that can prevent all users (even root) from deleting a file. Chattr is a command that can be used to set file attributes that can prevent all users (even root) from deleting a file.
 +\\
 +
 \\ \\
 == Viewing Immutable permissions == == Viewing Immutable permissions ==
Line 11: Line 13:
 </sxh> </sxh>
 \\ \\
 +== Setting file attributes with chattr ==
 To prevent everyone (even root) from deleting a file: To prevent everyone (even root) from deleting a file:
 <sxh bash> <sxh bash>
Line 22: Line 25:
 <sxh bash> <sxh bash>
 chattr -i file chattr -i file
 +</sxh>
 +\\
 +\\
 +== Restricting Editable files ==
 +You can use the +a attribute to allow users to append information into a file only:
 +<sxh bash>
 +chattr +a
 </sxh> </sxh>
immutable.1450810829.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki