2016-02-16 11:14:30 +03:00
|
|
|
# chattr
|
|
|
|
|
|
|
|
> Change attributes of files or folders.
|
|
|
|
|
2019-02-08 03:31:19 +03:00
|
|
|
- Make a file or directory immutable to changes and deletion, even by superuser:
|
2016-02-16 11:14:30 +03:00
|
|
|
|
2019-02-08 03:31:19 +03:00
|
|
|
`chattr +i {{path/to/file_or_directory}}`
|
2016-02-16 11:14:30 +03:00
|
|
|
|
2019-02-08 03:31:19 +03:00
|
|
|
- Make a file or directory mutable:
|
2016-02-16 11:14:30 +03:00
|
|
|
|
2019-02-08 03:31:19 +03:00
|
|
|
`chattr -i {{path/to/file_or_directory}}`
|
2016-02-16 11:14:30 +03:00
|
|
|
|
|
|
|
- Recursively make an entire folder and contents immutable:
|
|
|
|
|
|
|
|
`chattr -R +i {{folder}}`
|