(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



Using acl's (access control lists)

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.




Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

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. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.


book graphic unix and linux troubleshooting guide

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!



 I sell and support
 Kerio Mail server




pavatar.jpg
More:
       - Linux
       - Unix


Unix/Linux Consultants

Skills Tests

Guest Post Here











My Favorites

Change Congress