Merturbation / xar

Automatically exported from code.google.com/p/xar
0 stars 0 forks source link

car can clobber parent folder ownership #86

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Using sudo, if I create and then extract an archive, attempting to -k preserve 
existing, and -P preserve ownerships, xar can clobber the ownership of a parent 
directory for which it didn't record ownership data, simply because it needs to 
write to that directory. Is it chown'ing and forgetting to chown back?

Specifically, using sudo and absolute paths, xar doesn't record ownership data 
for directories above the target directory. This can be seen by a verbose -tvf 
listing. Now, delete the target directory and restore using -C / -xkvPf flags. 
While xar claims "already exists, not overwriting" for the parent directory, it 
nevertheless changes ownership to root for the immediate parent directory. 
(Directories further up are left untouched.)

What is the expected output? What do you see instead?

I expect all file ownerships as before. Instead, other programs such as 
ExpanDrive, my Dock, or SIlverlight stop working, and I spend many hours 
debugging these other programs before realizing that xar has hosed my 
ownerships.

What version of the product are you using? On what operating system?

xar 1.6dev on Mac OS X Version 10.7.4

Please provide any additional information below.

Sample script and output attached.

Original issue reported on code.google.com by ba...@math.columbia.edu on 17 Jul 2012 at 6:56

Attachments: