xfs
[Top] [All Lists]

Re: setfacl bug

To: Ethan Benson <erbenson@xxxxxxxxxx>, agruen@xxxxxxx
Subject: Re: setfacl bug
From: Nathan Scott <nathans@xxxxxxx>
Date: Mon, 12 Aug 2002 10:21:23 +1000
Cc: linux-xfs@xxxxxxxxxxx, acl-devel@xxxxxxxxxxx
In-reply-to: <20020810211425.A23502@xxxxxxxxxxxxxxx>
References: <20020810211425.A23502@xxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.4i
hi,

This one needs to be reported to the setfacl author - the fix
for this one will need a better knowledge of the setfacl code
than I have.

Andreas, from a quick look this is almost certainly related to
that 2.0.13 change which makes acl_get_file fail for reg files
when asked about default ACLs.  I've added some ltrace output
below which provides a bit more info on top of Ethan's notes.

cheers.

-- 
Nathan


On Sat, Aug 10, 2002 at 09:14:25PM -0800, Ethan Benson wrote:
> I originally noticed this problem start after upgrading to acl 2.0.15,
> however i thought perhaps it was related to xattr bugs in 2.4.18 so i
> waited until upgrading to 2.4.19 to see if the problem persists, it
> does:
> 
> eb@ash ~/tmp$ mkdir src dst
> eb@ash ~/tmp$ mkdir src/dir dst/dir
> eb@ash ~/tmp$ touch src/dir/file dst/dir/file
> eb@ash ~/tmp$ setfacl -m u:bin:r-- src/dir/file 
> eb@ash ~/tmp$ (cd src ; getfacl --skip-base -R -P .) | (cd dst ; setfacl 
> --restore=-)
> setfacl: dir/file: Permission denied
> eb@ash ~/tmp$ getfacl src/dir/file 
> # file: src/dir/file
> # owner: eb
> # group: eb
> user::rw-
> user:bin:r--
> group::r--
> mask::r--
> other::r--
> 
> eb@ash ~/tmp$ getfacl dst/dir/file 
> # file: dst/dir/file
> # owner: eb
> # group: eb
> user::rw-
> group::r--
> other::r--
> 
> i use the above method as part of my backup script, it worked with acl
> 2.0.8 but not with 2.0.15.
> 
> current kernel is 2.4.19 with split patches, previous kernel was
> 2.4.18 with split patches.
> 
> here is the relevant piece of strace output:
> 
> lstat64(0x10015750, 0x7ffff8c8)         = 0
> SYS_212(0x10015750, 0xffeeb84, 0x7ffff710, 0x84, 0xa0a0a0a) = -1 ENODATA (No 
> data available)
> stat64(0x10015750, 0x7ffff7a8)          = 0
> SYS_212(0x10015750, 0xffeeb9c, 0x7ffff710, 0x84, 0xff95d20) = -1 ENODATA (No 
> data available)
> stat64(0x10015750, 0x7ffff7a8)          = 0
> open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No 
> such file or directory)
> open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No 
> such file or directory)
> write(2, "setfacl: dir/file: Permission de"..., 37setfacl: dir/file: 
> Permission denied) = 37
> read(0, "", 4096)                       = 0
> exit(0)                                 = ?
> 
> 
> -- 
> Ethan Benson
> http://www.alaska.net/~erbenson/


$ ( cd src ; getfacl --skip-base -R -P . ) | ( cd dst ; ltrace setfacl 
--restore=- )
[...]
acl_get_file(0x0804daf0, 32768, 0x40136680, 0x4004e1de, 1) = 0x0804ee24
acl_dup(0x0804ee24, 32768, 0x40136680, 0x4004e1de, 1) = 0x0804eeb4
acl_free(0x0804eeb4, 0, 0xbffff978, 5, 0x0804ed30) = 0
acl_init(5, 0x40012c90, 0xbffff97c, 0x0804a805, 0x0804eeb4) = 0x0804eecc
acl_get_file(0x0804daf0, 16384, 0xbffff90c, 0x4001c8a6, 1) = 0
__errno_location()                                = 0x40139a20
__errno_location()                                = 0x40139a20
strerror(13)                                      = "Permission denied"
fprintf(0x40136360, "%s: %s: %s\n", "setfacl", "dir/file", "Permission 
denied"setfacl: dir/file: Permission denied
) = 37
acl_free(0x0804eecc, 1, 0xbffff978, 5, 0x0804ed30) = 0
acl_free(0x0804ee24, 1, 0xbffff978, 5, 0x0804ed30) = 0


<Prev in Thread] Current Thread [Next in Thread>