The behavior of applying permissions to parent directories in the case of
extracting a file by name as you describe doesn't seem to indicate
permissions would be applied according to the man pages:
http://www.gnu.org/software/tar/manual/html_node/extract-dir.html#SEC28

The man page indicates if the directories already exist it will merge the
file to the proper path.  My guess is it doesn't touch the permissions for
that reason... (what would we expect tar to do to the permissions if the
directory structure existed without the proper permissions?)

That's my guess anyway...

On Jul 14, 2010 10:01 PM, "Rubin Bennett" <[email protected]> wrote:

Talk about new school... all those double dashes make my head spin!

So here's how I'd do what you outlined:

install -d -oadm a
install -d -ogames a/b
install -d -onews a/b/c
install -d -ouucp a/b/c/d

tar -cvf test.tar a
rm -rf a
tar -xvf test.tar

tree -u a
[r...@zeus ~]# tree -u a

a
`-- [games ] b
`-- [news ] c
`-- [uucp ] d
3 directories, 0 files

I suspect that in the compatibility mode for geezers like me who haven't
fully graduated to the endless double-dash argument scheme, there's an
implied -p (or for you Gnu kids, --preserve-permissions) that sets not
just the permissions of the specified directory, but also the ownership
of the parent directories.

HTH
R

Rubin Bennett
rbTechnologies, LLC
1970 VT Route 14 South
East Montpelier, VT 05651

(802)223-4448
http://thatitguy.com

"Think for yourselves and let others enjoy the privilege to do so too."
 Voltaire, Essay on Tolerance
 French author, humanist, rationalist, & satirist (1694 - 1778)


-----Original Message-----
From: Anthony Carrico [mailto:[email protected]]
Sent: Wednesday, J...

Reply via email to