0

I have a user bob and he is a member of the group developers.

I want all developers to be able to read, write and execute on the directory /home/testing and all sub-directories. The directory /home/testing is owned by the user testing and belongs to the group testing.

To do this, I did the following:

# Create the developers group and add bob to it
groupadd developers
useradd -G developers bob

# Clear out any existing ACLs recursively
setfacl -Rb 

# Give the developers group read, write and execute permissions recursively (and by default) on the selected directory and all subdirectories.
setfacl -Rdm g:developers:rwx /home/testing

After making these changes, I logged out and back in with the user bob. However, the user bob still cannot write to files located in /home/testing or any sub-directory. I get a permission denied error.

Running getfacl on /home/testing looks like this:

# file: home/testing
# owner: testing
# group: testing
user::rwx
group::r-x
other::r-x
default:user::rwx
default:group::r-x
default:group:developers:rwx
default:mask::rwx
default:other::r-x

Looks correct to me. Anyone know why I still get a permission denied error when writing to /home/testing with the user bob?

2

Figured this one out on my own. Bit of a bone-headed mistake. I assumed that setfacl -Rdm would set the set the defaults and the active ACL permissions. But instead it only set the defaults.

This command was also necessary:

setfacl -Rm g:developers:rwx /home/testing

Running getfacl on /home/testing now returns the following:

# file: home/testing
# owner: testing
# group: testing
user::rwx
group::r-x
group:developers:rwx
mask::rwx
other::r-x
default:user::rwx
default:group::r-x
default:group:developers:rwx
default:mask::rwx
default:other::r-x

And no more permission denied errors when writing files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.