1

POSIX file ACLs: is it possible to grant default read access for a specific user to new files/directories within a directory, without setting default ACLs for user::/group::/mask::/other::?

On a directory with the following permissions:

drwxrwxr-x

Executing:

sudo setfacl -Rdm user:someuser:rx .

Results in:

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

In my specific use case this time, the default ACL is to ensure a backup user can access all the contents of the directory. However, a service creates a socket in the directory in question on start, and the other default ACL entries above result in that socket not being world-writable, which it needs to be.

Is there a way to set default file permissions for a specific user without affecting default file permissions otherwise?

1 Answer 1

0

Yes it is possible, as like below command

To add ACL for specific user you can try this:

setfacl -m u:kiosk:rw- file_name

To remove ACL for specific user you can try this

setfacl -x u:kiosk file_name

To remove all ACL on that specific file you can

setfacl -b file_name

To check your executable command is accurate or not you can try through getfacl command as like below

getfacl file_name
1
  • That is an answer that I was looking for. Thanks a lot
    – Pavel K
    Dec 15, 2016 at 16:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .