Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #211670
| From | "Thomas Schmitt" <scdbackup@gmx.net> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: clone ACL permissions |
| Date | 2019-07-23 13:30 +0200 |
| Message-ID | <yn19v-45v-1@gated-at.bofh.it> (permalink) |
| References | <yn0Qa-3Z0-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi,
consider this from man setfacl:
--restore=file
Restore a permission backup created by `getfacl -R' or similar. All
permissions of a complete directory subtree are restored using this
mechanism. If the input contains owner comments or group comments,
setfacl attempts to restore the owner and owning group. If the
input contains flags comments (which define the setuid, setgid, and
sticky bits), setfacl sets those three bits accordingly; otherwise,
it clears them. This option cannot be mixed with other options
except `--test'.
You could write a program which reads the text blocks in the getfacl -R
file and only writes those to a new file, which contain lines other than
the chmod-related "user::", "group::", "other::".
This would curb the eagerness of setfacl --restore to the files which
really need it.
Depending on your situation. some manipulation of the file paths in the -R
file might be necessary.
(And of course you urgently need a backup of your ACLs. If your favorite
backup tool does not record them, consider to run getfacl -R and to
include the resulting file in your backup.)
Have a nice day :)
Thomas
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
clone ACL permissions Adam Weremczuk <adamw@matrixscience.com> - 2019-07-23 13:10 +0200
Re: clone ACL permissions "Thomas Schmitt" <scdbackup@gmx.net> - 2019-07-23 13:30 +0200
Re: clone ACL permissions Adam Weremczuk <adamw@matrixscience.com> - 2019-07-23 13:50 +0200
Re: clone ACL permissions Teemu Likonen <tlikonen@iki.fi> - 2019-07-23 13:30 +0200
csiph-web