首页 > 解决方案 > How to open up access to a directory for a user using setfacl

问题描述

I need to open up access to a directory for given user (user1) in a redhat machine. I'm using the setfacl command as follows

sudo setfacl -R -m u:user1:rwx /var/lib/docker/volumes/logs/_data

then I check the access using getfacl command and this is what I see

user::rwx
user:user1:rwx
group::r-x
mask::rwx
other::r-x
default:user::rwx
default:user:user1:rwx
default:group::r-x
default:mask::rwx
default:other::r-x

标签: linuxshellchmodchown

解决方案


You do it right.

Whenever an ACL contains any Default ACL entries, the three Default ACL base entries (default owner, default group, and default others) must also exist.

https://linux.die.net/man/1/setfacl


推荐阅读