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
immutable [2015/12/22 19:00] – luke7858immutable [2015/12/22 19:03] (current) – luke7858
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: (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