bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ls and chmod broken on Solaris 9 - ACL problem?


From: Tim Bishop
Subject: ls and chmod broken on Solaris 9 - ACL problem?
Date: Mon, 14 Mar 2005 18:46:07 +0000
User-agent: Mutt/1.5.6i

We've discovered a bug in the ACL handling on Solaris 9. It noticably
breaks ls and chmod. Here are some details:

deneb % uname -a
SunOS deneb 5.9 Generic_117171-12 sun4u sparc SUNW,UltraAX-i2
deneb % coreutils/bin/ls --version
ls (coreutils) 5.2.1
Written by Richard Stallman and David MacKenzie.

Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
deneb %

Create directory and confirm permissions with coreutils ls and the
Solaris ls (/bin/ls):

deneb % mkdir acltest
deneb % coreutils/bin/ls acltest
drwxr-xr-x  2 tdb staff 512 Mar 14 17:50 acltest
deneb % /bin/ls -ld acltest
drwxr-xr-x   2 tdb      staff        512 Mar 14 17:50 acltest
deneb %

Set ACL to give the bin group read and execute:

deneb % setfacl -s u::rwx,g::---,o:---,g:bin:r-x,m:rwx acltest

Notice that the Solaris ls and getfacl correctly show the permissions
and acl, but that the coreutils ls incorrectly shows group rwx.

deneb % coreutils/bin/ls -ld acltest
drwxrwx---+ 2 tdb staff 512 Mar 14 17:50 acltest
deneb % /bin/ls -ld acltest
drwx------+  2 tdb      staff        512 Mar 14 17:50 acltest
deneb % getfacl acltest

# file: acltest
# owner: tdb
# group: staff
user::rwx
group::---              #effective:---
group:bin:r-x           #effective:r-x
mask:rwx
other:---
deneb %

This problem also appears to affect chmod. Lets try and give group rwx
using the coreutils chmod. It doesn't appear to do it since I assume
it thinks it's already there:

deneb % coreutils/bin/chmod g+rwx acltest
deneb % coreutils/bin/ls -ld acltest
drwxrwx---+ 2 tdb staff 512 Mar 14 17:50 acltest
deneb % /bin/ls -ld acltest
drwx------+  2 tdb      staff        512 Mar 14 17:50 acltest
deneb %

And the same again but using the Solaris chmod (/bin/chmod). This time
it actually does it:

deneb % /bin/chmod g+rwx acltest
deneb % coreutils/bin/ls -ld acltest
drwxrwx---+ 2 tdb staff 512 Mar 14 17:50 acltest
deneb % /bin/ls -ld acltest
drwxrwx---+  2 tdb      staff        512 Mar 14 17:50 acltest
deneb % getfacl acltest

# file: acltest
# owner: tdb
# group: staff
user::rwx
group::rwx              #effective:rwx
group:bin:r-x           #effective:r-x
mask:rwx
other:---
deneb %

I'm not sure where this bug is in the code, but it seems likely it's
in the ACL handling stuff.

Let me know if there's any other information you need.

Cheers,
Tim.

-- 
Tim Bishop,
Computer Science Computing Officer.
PGP Key: 0x5AE7D984

Attachment: pgpbkNsji2ZL2.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]