Bug 538 - tar does not preserve symlink owner.group upon extraction
tar does not preserve symlink owner.group upon extraction
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: tar (Show other bugs)
4.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Preston Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1998-12-19 01:27 EST by jve
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-03-22 12:34:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description jve 1998-12-19 01:27:07 EST
When running as root, tar will properly set the owner and
group of extracted directories and files.  However, for
symlinks, it uses root.root.  The chown and chgrp commands
do operate on the symlink, itself, and not its target, so
it is possible to set the ownership properly.  The symlink
owner.group info *is* in the tar archive, so that's not the
problem.
Comment 1 Preston Brown 1999-03-22 12:33:59 EST
linux versions prior to 2.1.86 didn't include the lchown syscall,
which allowed changing ownership of a symlink itself, instead of the
file it points to.  While it may have looked like the ownership was
changed, the behaviour was undefined.

GNU tar doesn't handle symlink ownership well.  however, it does
support lchown.  In Red Hat Linux 6.0, which will ship with kernel
2.2.x, this means that ownership of symlinks is correctly handled.
Comment 2 Preston Brown 1999-03-22 12:34:59 EST
for more information, please see tar's README file.

Note You need to log in before you can comment on or make changes to this bug.