Linux Scroll

Just another WordPress.com site

Access Control Lists

ACL can configure different permissions for different users.
There are two types of ACLs: access ACLs and default ACLs. An access ACL is the access control list for a specific file or directory. A default ACL can only be associated with a directory; if a file within the directory does not have an access ACL, it uses the rules of the default ACL for the directory.

ACLs can be configured:

Per user
Per group
Via the effective rights mask
For users not in the user group for the file

Give read and write permissions to user dodo:

$ setfacl -m u:andrius:rw /project/engineering

Give read and write permissions to group:

$ setfacl -m g:110:rw /project/engineering

Remove all permissions from the user with UID 500:

$ setfacl -x u:500 /project/engineering

Revoking write access:

$ setfacl -m m::rx file

Check acl:

$ getfacl file

Copy acl to another file:

$ getfacl file1 | setfacl --set-file=- file2

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: