Home > AIX, Commands, commands, Linux > Linux – Set ACL for user on directory

Linux – Set ACL for user on directory

If you want to set an acl for a specific user/group/other on linux you can issue the following:

$ setfacl -m <type>:<name>:<permission> <file|directory name>

So for example if wishing to grant Bob read, write, execute permissions on directory dir you would issue the following:

$ setfacl -m u:bob:rwx dir

To check Bob’s permissions you can use getfacl with the omit-headers flag which hides the first three lines showing the name, owner and group:

$ getfacl --omit-header dir
user::rwx
user:bob:rwx
group::r-x
mask::rwx
other::---

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

%d bloggers like this: