Linux Security Hardening for Beginners Part 04 – Using Access Control Lists
Welcome to our 4th part of our tutorial series. Today we will see how to create an access control list. With an ACL, we can allow only a certain person to access a file or directory or we can allow multiple people to access a file or directory with different permissions for each person. If we have a file or directory that’s wide open for Everyone, we can use an ACL to allow different levels of access for either a group or an individual. To begin, let’s create a text file Next, use getfacl to see if we have any access control lists already set on the text file. All we can see here are just the normal permission settings, so there’s no ACL. The first step for setting an ACL is to remove all permissions from everyone except for the user of the file. That’s because the default permission settings allow members of the group to have read/write access and others to have read access. # chmod 600 acl_test.txt Next we will set the ACL using setfacl. Using this you can allow a user or a group to have any combination of read write or execute Privileges. # setfacl -m u:rd:r acl_test.txt Now let’s see the permissions are set The M option of setfacl means that we’re about to modify the ACL. The u: means that we’re setting...
Read More