From the course: Linux CentOS 7: Files and Permissions

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Set ACLs

Set ACLs - Linux Tutorial

From the course: Linux CentOS 7: Files and Permissions

Start my 1-month free trial

Set ACLs

- [Instructor] ACLs are turned on by default in CentOS for the OS partition only. In comparison to being creative with standard permissions, along with special bits and umasks to solve problems, ACLs are downright easy to implement. With ACLs, you just give the right people and groups the access they need, and you're done. The command we use to assign file ACLs is setfacl. The syntax is setfacl -m user: <username> :<permissions> <file>. For example, if we wanted to set our wx permissions for the user name "bob" on /home/file.txt, we'd type setfacl -m, for modify, user:bob for the username, rwx for permissions, followed by the file path, in this case, /home/file.txt. Let's go to a terminal to use the setfacl command. To set up this exercise, we'll create a directory called acldir, using mkdur. Type in sudo mkdir /home/acldir, and hit Enter. Type in your password, and hit Enter again. We had to elevate privileges because we're creating a directory outside of our user's home directory…

Contents