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?

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

To get more details about ACL visit http://topicsfeedback.com/base-acl-and-posix-acl-in-linux-system/ or you can try below Apps in google Play Store named as "Advance Linux" this is much details about Linux security system

  • That is an answer that I was looking for. Thanks a lot – Pavel K Dec 15 '16 at 16:52

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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