Difference between revisions of "GNU Linux/Permissions/POSIX ACLs"

From WhyAskWhy.org Wiki
Jump to: navigation, search
m (Added some scratch notes and some Q/A re how files/directories are treated. Obviously I have a lot of reading to do.)
m (Added another reference.)
Line 72: Line 72:
 
* http://users.suse.com/~agruen/acl/linux-acls/online/
 
* http://users.suse.com/~agruen/acl/linux-acls/online/
 
* https://publib.boulder.ibm.com/tividd/td/TSMC/GC32-0789-04/en_US/HTML/ans5000090.htm
 
* https://publib.boulder.ibm.com/tividd/td/TSMC/GC32-0789-04/en_US/HTML/ans5000090.htm
 +
* http://www.vanemery.com/Linux/ACL/linux-acl.html
  
 
* https://docs.google.com/document/d/1-US07DZV7eoam1P8ZrTM7UgZF5DQs0Q8NNBAXVAem_Y/edit
 
* https://docs.google.com/document/d/1-US07DZV7eoam1P8ZrTM7UgZF5DQs0Q8NNBAXVAem_Y/edit

Revision as of 01:50, 28 February 2015


Summary

This page will record my efforts to learn how to use POSIX ACLs. I'm familiar with ACLs used on Windows systems and to a lesser extent Mac OS X (GUI-only), but this is my first foray into POSIX ACLs.


TODO

Explain this:

 setfacl -d -m group:rwx /path/to/your/dir

It appears to be setting the Default ACL for the owning group to rwx (octal 777) for a specific directory. Presumably this means that inheritance would push those settings down to any newly created files/directories.

  • Q: What about existing files?
  • Q: What about existing directories?


Mask

The mask entry further limits the permissions granted by named user, named group, and owning group entries by defining which of the permissions in those entries are effective and which are masked. [1]

  • If permissions exist in one of the mentioned entries as well as the mask, they are effective.
  • Permissions contained only in the mask or only in the actual entry are not effective--meaning the permissions are not granted.
  • All permissions defined in the owner and owning group entries are always effective.


Removing POSIX ACLs

To remove all the permissions for a user, groups, or others, use the following command [2]:

setfacl -x ACL entry type file

For example, to remove all permissions from the user antony:

setfacl -x u:antony /mnt/gluster/data/test-file


References

Directly used

Queued up