Unix & Linux Asked by Ald In on February 13, 2021
If there are files unreadable even to the owner (chmod a-r
), tar
and other tools will throw errors when creating an archive. However, these files could be updated with chmod u+r
before archiving, and chmod u-r
after unpacking — so they are not actually unreadable.
How can such files be archived with their exact permissions? I guess one generate a permissions-restore
script (with stat
), run chmod u+r
, run tar
, and keep both the archive and the permissions script. Actually, mtime would have to be saved as well (since chmod destroys it). Anything simpler?
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP