3

I am running 12.04 x64 server on ext4 disk. There are two user groups 'A' and 'B'. For a specific directory, I would like to give its all permissions to user group 'A'. Also I would like to give only 'write' permission to user group 'B'. A user of 'B' should only be allowed to write a file or create directory in the directory.

(Should not be allowed to open or read a file.)

I tried with acl as below but not worked well.

sudo setfacl -d -m g:GROUPB:-wx /mydirectory

Result:

The user of GROUPB could not entered 'mydirectory' because of permission denied error.

Does anyone know if it is possible?

Thank you!

2

setfacl -m d:g:grpB:-wx /tmp/testgrp/ This works for me.

When grpA:userA creates a file under /tmp/testgrp/testA and

When grpB:userB tries to cat the file, it throws a message saying permission denied.

But the same user(grpB:UserB) tries to touch /tmp/testgrp/testB it creates a file named testB and grpA:UserA can do cat /tmp/testgrp/testB to display the file contents

Hope this helps

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.