In Windows you can do this (backup and restore basic file permissions) can this be done in Linux?
And to clarify, by basic file permissions I don't mean ACLs in Linux, I mean the default permissions modified with chmod
/ chown
.
In Windows you can do this (backup and restore basic file permissions) can this be done in Linux?
And to clarify, by basic file permissions I don't mean ACLs in Linux, I mean the default permissions modified with chmod
/ chown
.
Yes, using the
stat
command (Seeman stat
,man find
,man xargs
), but why would it be needed? In normal Linux life, wholesale permission changes/restores are rarely needed.If you have the space, just
tar
up your test directory. If you need to revert things, delete the test files, and extract your archive to get back to what you started with.tar
preserves ownership and permissions by default.