linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Filesystem (directory) permissions meaning difference for x86_64 and x86 for 3.1?
@ 2011-11-09 20:51 Bruno Prémont
  2011-11-13 11:11 ` [resolved] " Bruno Prémont
  0 siblings, 1 reply; 2+ messages in thread
From: Bruno Prémont @ 2011-11-09 20:51 UTC (permalink / raw)
  To: Al Viro; +Cc: linux-fsdevel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]

Hi,

On a x86_64 system I'm getting permission denied when trying to chdir()
into a directory where I have only 'x' permissions (be it with unix
permissions or with posix ACLs).
For the same layout of directory I can successfully chdir() on x86 as I
can with older kernels of 2.6 series.

In both cases the filesystem is tmpfs with support for posix ACLs and
kernel is 3.1.0.


Directory layout:
drwx--x---  3 root test   60 Nov  9 21:14 /tmp/btest
drwxrwx---  2 root test   40 Nov  9 21:14 /tmp/btest/subtest
drwxr-x---+ 3 root root   60 Nov  9 21:10 /tmp/test
drwxrwx---+ 2 root root   40 Nov  9 21:10 /tmp/test/subtest

Posix ACLs
# file: /tmp/test
# owner: root
# group: root
user::rwx
group::r-x
group:test:--x
mask::r-x
other::---

# file: test/subtest/
# owner: root
# group: root
user::rwx
group::r-x
group:test:rwx
mask::rwx
other::---


When executing as user test (with test as only group), on x86_64 I get
EPERM on chdir(X) where X is any one of the 4 directories above.

On x86 I can chdir() into the directory without issue (as expected),
and when in /tmp/test (or /tmp/btest) I get EPERM when trying to list
contents - expected as well. Under subtest I can list content.

The same results are obtained on XFS filesystem.

Any idea what's wrong?

Both test configs attached.


Bruno

[-- Attachment #2: x86.config.bz2 --]
[-- Type: application/x-bzip, Size: 5162 bytes --]

[-- Attachment #3: x86_64.config.bz2 --]
[-- Type: application/x-bzip, Size: 3723 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [resolved] Filesystem (directory) permissions meaning difference for x86_64 and x86 for 3.1?
  2011-11-09 20:51 Filesystem (directory) permissions meaning difference for x86_64 and x86 for 3.1? Bruno Prémont
@ 2011-11-13 11:11 ` Bruno Prémont
  0 siblings, 0 replies; 2+ messages in thread
From: Bruno Prémont @ 2011-11-13 11:11 UTC (permalink / raw)
  Cc: Al Viro, linux-fsdevel, linux-kernel

On Wed, 09 November 2011 Bruno Prémont wrote:
> On a x86_64 system I'm getting permission denied when trying to chdir()
> into a directory where I have only 'x' permissions (be it with unix
> permissions or with posix ACLs).
> For the same layout of directory I can successfully chdir() on x86 as I
> can with older kernels of 2.6 series.
> 
> In both cases the filesystem is tmpfs with support for posix ACLs and
> kernel is 3.1.0.
> 
> 
> Directory layout:
> drwx--x---  3 root test   60 Nov  9 21:14 /tmp/btest
> drwxrwx---  2 root test   40 Nov  9 21:14 /tmp/btest/subtest
> drwxr-x---+ 3 root root   60 Nov  9 21:10 /tmp/test
> drwxrwx---+ 2 root root   40 Nov  9 21:10 /tmp/test/subtest
> 
> Posix ACLs
> # file: /tmp/test
> # owner: root
> # group: root
> user::rwx
> group::r-x
> group:test:--x
> mask::r-x
> other::---
> 
> # file: test/subtest/
> # owner: root
> # group: root
> user::rwx
> group::r-x
> group:test:rwx
> mask::rwx
> other::---
> 
> 
> When executing as user test (with test as only group), on x86_64 I get
> EPERM on chdir(X) where X is any one of the 4 directories above.
> 
> On x86 I can chdir() into the directory without issue (as expected),
> and when in /tmp/test (or /tmp/btest) I get EPERM when trying to list
> contents - expected as well. Under subtest I can list content.
> 
> The same results are obtained on XFS filesystem.
> 
> Any idea what's wrong?

The issue was two entries in /etc/group for the same group name but with
two distinct GIDs :/
This explains why I could not reproduce on a different system!

Bruno

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-13 11:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-09 20:51 Filesystem (directory) permissions meaning difference for x86_64 and x86 for 3.1? Bruno Prémont
2011-11-13 11:11 ` [resolved] " Bruno Prémont

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).