immutable
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| immutable [2015/12/22 18:58] – created luke7858 | immutable [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| \\ | \\ | ||
| + | == Viewing Immutable permissions == | ||
| + | <sxh bash> | ||
| + | lsattr file | ||
| + | </ | ||
| + | Example output of immutable file: | ||
| + | <sxh bash> | ||
| + | ----i---------- filename | ||
| + | </ | ||
| + | \\ | ||
| + | == 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 15: | Line 25: | ||
| <sxh bash> | <sxh bash> | ||
| chattr -i file | chattr -i file | ||
| + | </ | ||
| + | \\ | ||
| + | \\ | ||
| + | == Restricting Editable files == | ||
| + | You can use the +a attribute to allow users to append information into a file only: | ||
| + | <sxh bash> | ||
| + | chattr +a | ||
| </ | </ | ||
immutable.1450810706.txt.gz · Last modified: 2024/05/23 07:26 (external edit)
