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

Re: Changes in the way tar(1) constructs directory permissions



Don Armstrong writes:
> On Sat, 08 Nov 2014, John Conover wrote:
> > That's true, Don, but the issue is the ownership of the DIRECTORIES
> > when installing, a directory TREE in a non root temporary directory.
> > The file ownerships are, indeed, correct. The ownerships of the
> > directories down to the files are always root/root.
>

su
cd /
tar cvf xxx.tar etc/cups/printers.conf
cd
tar xvf /xxx.tar
ls -al etc

and look at the ownership of the cups directory and compare it to the
ownership in /etc.

This is a changed behavior in tar(1), (at least from Ubuntu 10.04 LTS,
which I just verified.)

Note that it only happens when when tar'ing file names in a directory,
and not the directory itself, (tar cvf xxx.tar etc/cups, and restoring,
everything has the correct ownership/permissions.)

See, also:

    http://www.gnu.org/software/tar/manual/html_node/Directory-Modification-Times-and-Permissions.html

for some details, where it would seem that the behavior is
acceptable-at issue is that it changed between the last versions of
Linux, and the newer.

    Thanks, Don,

    John

-- 

John Conover, conover@rahul.net, http://www.johncon.com/


Reply to: