Adding/Removing Users from ACL in Linux


At times, I come across cases where I need to give access to a group/user to a particular file/directory. This can be done using ACL (Access Control List). Below is how its done 🙂

setfacl -Rdm u:test_user:rwx /opt/app 

Gives RWX access to test_user to /opt/app directory & all its sub-directories.

setfacl -b /opt/app 

Removes ACL entries from /opt/app directory.

setfacl -x u:test_user /opt/app 

Revokes the rights given to test_user to /opt/app directory.

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