From Fedora Project Wiki
Description
This test case ensures that the acl
utilities (setfacl
and getfacl
) can set and then retrieve the access control entries for a specific file.
Setup
Ensure that the acl
package is installed on your Fedora system.
How to test
- Open a terminal.
- Create a test file using the command:
touch testfile
. - Set an ACL entry on the file granting read access to user
testuser
with:setfacl -m u:testuser:r testfile
. - Retrieve the ACLs for the file using:
getfacl testfile
.
Expected Results
- The
setfacl
command should execute without error. - The output of the
getfacl testfile
command should include an entry like:user:testuser:r--
. - No errors should be encountered during the process.
Optional
Optionally, test additional acl
functionalities. For instance, try setting ACLs for groups, removing ACLs using setfacl
, or testing with directories and checking inheritance.