a subtle(?) tar extraction permission problem
Robert P. J. Day
rpjday at mindspring.com
Fri Jun 25 21:34:06 UTC 2004
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
More information about the fedora-list
mailing list