Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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

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

Your Answer


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.