bart-oclug at jukie.net
Wed Jan 22 11:01:33 EST 2003
* Bart Trojanowski <bart-oclug at jukie.net> [030122 11:00]:
> * Michael P. Soulier <msoulier at digitaltorque.ca> [030122 10:53]:
> > Group,
> > When root untar's a file, the files maintain ownership of the original
> > owner. This doesn't happen with a non-priviledged user.
> > Anyone know why that is?
> Probably because a user is not allowed to change the file ownership to
> that other then it's own.
> That is to say...
> touch foo
> chown someoneelse foo
> will fail, unless you are root.
Looking through the manpage I found --same-owner, which would force the
unpacked file to be owned by the person that the tar file said it
# tar xz --same-owner -f /tmp/foo.tgz
tar: foo: Cannot change ownership to uid 10107, gid 1000: Operation not permitted
tar: Error exit delayed from previous errors
However, because you still don't have permissions... it fails.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://tux.oclug.on.ca/pipermail/oclug/attachments/20030122/058b7242/attachment.bin
More information about the OCLUG