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

From WhyAskWhy.org Wiki
Jump to: navigation, search
m (Moved general permissions references to separate page.)
m (Added example from Red Hat documentation - removing ACL for user)
Line 13: Line 13:
  
 
* <code>setfacl -d -m group:rwx /path/to/your/dir</code>
 
* <code>setfacl -d -m group:rwx /path/to/your/dir</code>
 +
 +
== Removing POSIX ACLs ==
 +
 +
To remove all the permissions for a user, groups, or others, use the following command <ref name="redhat-removing-acls" />:
 +
 +
''<code>setfacl -x ACL entry type file</code>''
 +
 +
For example, to remove all permissions from the user <tt>antony</tt>:
 +
 +
<syntaxhighlight lang="bash">
 +
setfacl -x u:antony /mnt/gluster/data/test-file
 +
</syntaxhighlight>
  
 
== References ==
 
== References ==
  
=== ACLs ===
+
<references>
 +
 
 +
<ref name="redhat-removing-acls">[https://access.redhat.com/documentation/en-US/Red_Hat_Storage/2.0/html/Administration_Guide/ch09s05s03.html Support > Product Documentation > Red Hat Storage > 2.0 > Administration Guide > 9.5.3. Removing POSIX ACLs ]</ref>
 +
 
 +
</references>
 +
 
  
 
* https://help.ubuntu.com/community/FilePermissionsACLs
 
* https://help.ubuntu.com/community/FilePermissionsACLs

Revision as of 18:30, 26 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

Removing POSIX ACLs

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

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