Bug 511145

Summary: tar --xattrs does not back up default acl entries
Product: [Fedora] Fedora Reporter: Brad Smith <brads>
Component: tarAssignee: Ondrej Vasik <ovasik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: kdudka, ovasik
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.22-4.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 512097 (view as bug list) Environment:
Last Closed: 2009-07-24 19:39:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 512097    

Description Brad Smith 2009-07-13 21:34:58 UTC
Description of problem:
Default ACLs attached to directories are not restored, even if --xattrs is given.

Version-Release number of selected component (if applicable):
tar-1.22-2.fc11.i586

How reproducible:
Always

Steps to Reproduce:
[brad@satsuki test]$ touch file
[brad@satsuki test]$ mkdir dir
[brad@satsuki test]$ setfacl -m u:instructor:rx file
[brad@satsuki test]$ setfacl -m d:u:instructor:rx dir
[brad@satsuki test]$ getfacl *  # ACLs attached to file and dir
# file: dir
# owner: brad
# group: brad
user::rwx
group::rwx
other::r-x
default:user::rwx
default:user:instructor:r-x
default:group::rwx
default:mask::rwx
default:other::r-x

# file: file
# owner: brad
# group: brad
user::rw-
user:instructor:r-x
group::rw-
mask::rwx
other::r--

[brad@satsuki test]$ tar --xattrs -jcf /tmp/test-xattrs.tbz .
[brad@satsuki test]$ rm -rf .
[brad@satsuki test]$ tar -xvf /tmp/test-xattrs.tbz

[brad@satsuki test1]$ tar -jxf /tmp/test-xattrs.tbz 
tar: Record size = 8 blocks
./
./dir/
./file
[brad@satsuki test1]$ getfacl *  # No deft ACL on the directory
# file: dir
# owner: brad
# group: brad
user::rwx
group::rwx
other::r-x

# file: file
# owner: brad
# group: brad
user::rw-
user:instructor:r-x
group::rw-
mask::rwx
other::r--


Actual results:
dir no longer has a default acl

Expected results:
default acl is preserved

Comment 1 Ondrej Vasik 2009-07-14 10:00:23 UTC
Thanks for report, will check this...

Comment 2 Ondrej Vasik 2009-07-16 08:42:02 UTC
Fixed in tar-1.22-5.fc12 in RAWHIDE - the better one from the two possibilities was buggy. ACL's are stored correctly even with the old tar, but restoring default ACL's was not working for directories at all.

Comment 3 Fedora Update System 2009-07-16 12:02:44 UTC
tar-1.22-4.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/tar-1.22-4.fc11

Comment 4 Fedora Update System 2009-07-19 10:08:46 UTC
tar-1.22-4.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update tar'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-7706

Comment 5 Fedora Update System 2009-07-24 19:38:59 UTC
tar-1.22-4.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.