# # Using acl's (access control lists)
APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Using acl's (access control lists)

I've removed advertising from most of this site and will eventually clean up the few pages where it remains.

While not terribly expensive to maintain, this does cost me something. If I don't get enough donations to cover that expense, I will be shutting the site down in early 2020.

If you found something useful today, please consider a small donation.



Some material is very old and may be incorrect today

© August 2005 Tony Lawrence
August 2005

Many Unixes have file systems that implement a permissions model that goes beyond traditional Unix permissions. These have been called acl's (access control lists). Details may vary, but we'll use Linux commands here to demonstrate the usage.

With Linux, the two basic commands are "getfacl" and "setfacl". The underlying file system has to support these commands (because the extended permissions are stored in the file meta-data).

The "ls -l" command shows an extra "+" when acl's have been applied to a file:


-rw-r--r--+ 1 apl serv  3843 Aug 20 06:43 slwide.css
-rw-r--r--+ 1 apl serv  2501 Aug 20 06:43 smaller.css
-rw-r--r--+ 1 apl serv  2632 Aug 20 06:43 smallest.css
 

To actually see the extended perms, use "getfacl"

# file: slwide.css
# owner: apl
# group: serv
user::rw-
user:pcun:rw-
group::r--
mask::r--
other::r--

# file: smaller.css
# owner: apl
# group: serv
user::rw-
user:pcun:rw-
group::r--
mask::r--
other::r--

# file: smallest.css
# owner: apl
# group: serv
user::rw-
user:pcun:rw-
group::r--
mask::r--
other::r--
 

This shows that the user "pcun" has read/write permission on these files. That was set by "setfacl":

# setfacl -m u:pcun:rw  *.css
 

Keep in mind that the same general permission semantics work here: "pcun" would need "r-x" permission on the directory these files are in to do a general "ls -l" and of course would need "w" to create new files.


If you found something useful today, please consider a small donation.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> Using acl's (access control lists)


Inexpensive and informative Apple related e-books:

Take Control of iCloud, Fifth Edition

Take Control of the Mac Command Line with Terminal, Second Edition

iOS 10: A Take Control Crash Course

Take Control of Preview

Take Control of Apple Mail, Third Edition





More Articles by © Tony Lawrence





Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





FORTRAN was the language of choice for the same reason that three-legged races are popular. (Ken Thompson)




Linux posts

Troubleshooting posts


This post tagged:

Linux

Unix



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode