a subtle(?) tar extraction permission problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




say i have a directory structure a/b/c/{f1,f2,f3,...}. for access reasons, i decide to change the permissions on the "c" directory, perhaps changing the owner/group, and definitely changing the perms to include "setgid".


later, i get a tarball with contents a/b/c/{something}. i found out that if i extract that tarball while root, and the effect is to add or delete files under the "c" directory, the permissions on "c" revert back to default values. how annoying.

apparently, as long as what i'm extracting is already in that directory (so that the directory entries themselves don't change), i'm safe. but if the extraction changes the directory contents themselves, i get the owner/group/perms resetting on "c", which i'd
*really* like to avoid.


i've perused the tar options, and i don't see anything that says, "don't mess with existing options on existing directories." is there a standard approach to handle this?

rday



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux