bug-coreutils
[Top][All Lists]
Advanced

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

ls, chmod options to display or set ACLs?


From: Bruno Haible
Subject: ls, chmod options to display or set ACLs?
Date: Wed, 11 Jun 2008 00:01:34 +0200
User-agent: KMail/1.5.4

Hi,

As a simple user, I've wondered why setting the basic permissions and why
setting specific permissions on a file would require understanding the
options of two different programs: chmod vs. setfacl.

Also, I find it annoying that 'ls' is able to show the presence of an ACL,
through a '+' sign, but not the contents of an ACL.

On MacOS X, HP-UX, Solaris, the /bin/chmod program can set ACLs. [1]
On MacOX X, IRIX, the /bin/ls program has an option to display the contents of
ACLs. [2]

I'm proposing to add an option to coreutils 'ls' to show the contents of ACLs,
and to coreutils 'chmod' to set or remove ACLs.

Opinions?

The tricky issue is that each platform has a different syntax for ACLs in its
native tools (getfacl etc.).

Should the coreutils syntax (on output in 'ls', on the command line in 'chmod')
be platform dependent or not?

For example, to set an ACL for 'other', currently the command is:
  Linux, Cygwin:          setfacl -m other:4 $file
  FreeBSD:                setfacl -m other::4 $file
  Tru64:                  setacl -u other::4 $file
  HP-UX:                  orig=`lsacl $file | sed -e 's/ tmpfile0$//'`; chacl 
-r "${orig}(%.%,r--)" $file
  Solaris, AIX, MacOS X:  chmod o+r $file

I would propose to make it platform independent, so that it can be documented
in a simple way, and so that scripts relying on GNU chmod could be written
platform-independently.

Opinions?

Bruno


[1] 
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/chmod.1.html
[2] 
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/ls.1.html





reply via email to

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