Bug 159617 - restore fails to restore ext3 ACL's
restore fails to restore ext3 ACL's
Product: Fedora
Classification: Fedora
Component: dump (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jindrich Novy
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2005-06-06 01:32 EDT by Paul Janzen
Modified: 2013-07-02 19:07 EDT (History)
2 users (show)

See Also:
Fixed In Version: 0.4b40-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-06-09 06:58:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Fix ACLs in restore (8.83 KB, patch)
2005-06-08 09:39 EDT, Stelian Pop
no flags Details | Diff

  None (edit)
Description Paul Janzen 2005-06-06 01:32:25 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:
Dump and restore are not able to preserve ACL's or default ACL's. 

Dump claims to support ACL's as of upstream version 0.40.  The ACL's make it into the dump file, but restore doesn't extract them.


Version-Release number of selected component (if applicable):
dump-0.4b40-2; kernel-2.6.9-1.667

How reproducible:

Steps to Reproduce:
1. touch foo
2. setfacl -m u:nobody:r foo
3. dump -f demo.dump 
4. mkdir restore && cd restore
5. restore -xf ../demo.dump

Actual Results:  During restore, I see the following error message: 

restore: lsetxattr ./path/to/foo failed: Operation not supported

The restored file does not have the original ACL's. 

Compares also fail (lgetxattr failed: Operation not supported). 

Expected Results:  The restored file should have had the original ACL's applied. 

Additional info:

ext3 filesystem mounted with -oacl and -ouser_xattr. 

strace shows: 

lsetxattr("./path/to/foo", "system.", "\x01\x00\x00\x00\x01\x00\x06\x00\x02\x00\x04\x00c\x00\x00\x00\x04\x00\x04\x00\x1
0\x00\x04\x00 \x00\x04", 28, ) = -1 EOPNOTSUPP (Operation not supported)

First, the attribute name needs to be "system.posix_acl_access" (or "system.posix_acl_default", for default ACL's.)

Second, I think the attribute value also needs to be converted from the ext3 on-disk format (ext3_acl_entry) to the xattr_acl format.  I.e., the first word of the attribute value needs to be \x02\x00\x00\x00 (XATTR_ACL_VERSION), not \x01\x00\x00\x00 (EXT3_ACL_VERSION).
Comment 1 Stelian Pop 2005-06-08 09:39:59 EDT
Created attachment 115218 [details]
Fix ACLs in restore
Comment 2 Stelian Pop 2005-06-08 09:41:24 EDT
Indeed, ACL restoration in dump has issues.

The patch above should correct all the issues, including some additional
problems with EA and big endian machines.
Comment 3 Jindrich Novy 2005-06-09 06:58:12 EDT
The patch is now applied and the new dump-0.4b40-3 is now built.

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