Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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!

share|improve this question
add comment

1 Answer 1

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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