mirror of
https://github.com/xmengnet/the-art-of-command-line.git
synced 2024-12-25 02:16:28 +08:00
save and restore file permissions
This commit is contained in:
parent
b1ad68b215
commit
fb7d95ea97
1 changed files with 6 additions and 0 deletions
|
@ -193,6 +193,12 @@ Notes:
|
|||
|
||||
- File attributes are settable via `chattr` and offer an alternative, lower-level alternative to file permissions. For example, to protect accidental file deletion the immutable flag: `sudo chattr +i /critical/directory/or/file`
|
||||
|
||||
- Use `getfacl` and `setfcle` to save and restore file permissions. For example:
|
||||
```sh
|
||||
getfacl -R /some/path > permissions.txt
|
||||
setfacl --restore=permissions.txt
|
||||
```
|
||||
|
||||
|
||||
## Processing files and data
|
||||
|
||||
|
|
Loading…
Reference in a new issue