I'm trying to use ACLs with the xfs file system on Amazon Linux (RHEL-ish distribution). However, when I configure acls and try to access a file with a test user, my access is denied.
I currently have 2 users:
ec2-user: User to create and manage file. Owner and full rwx access
testuser: Access explicitly given via acl
- My current understanding with xfs is that acls work 'out of the box'. Unliked ext3/ext4, I don't need enable this option at mount. Is this correct?
- Below is a code snippet of how I'm creating and permissioning the file. Is this a correct implementation of acls?
# Create directory and add file sudo mkdir /aclDirectory sudo echo "some content" | sudo tee /aclDirectory/test.txt # Change owner to EC2 user and give RW access to 'testuser' sudo chown -R ec2-user /aclDirectory/ chmod -R 0700 /aclDirectory/ setfacl -R -m u::testuser:rw /aclDirectory # validate ACL permissions getfacl /aclDirectory/test.txt getfacl: Removing leading '/' from absolute path names # file: aclDirectory/test.txt # owner: ec2-user # group: root user::rwx user:testuser:rw- group::--- mask::rw- other::--- # Read test.txt cat /aclDirectory/test.txt cat: /aclDirectory/test.txt: Permission denied