Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 have a requirement to give permissions to a folder or file to multiple groups. I can do this using acl but acl is not present on our system. What other alternative do i have?

I have to do this at runtime

share|improve this question

migrated from Jun 25 '10 at 5:47

This question came from our site for professional and enthusiast programmers. or may help. They are much less obvious than regular Unix permissions. – msw Jun 25 '10 at 8:16
  1. Create a new group. Let's call it combinedgroup
  2. Add to this group all users of the groups to whom you want to give permission.
  3. chgrp combinedgroup /path/to/folder
  4. chmod 0770 /path/to/folder (or 0750 for read-only access)
share|improve this answer
Note: SU wants to do it at runtime – ukanth Jun 25 '10 at 5:49
but this will override existing group settings, my requirement is to add multiple groups to single folder – Sirish Kumar Jun 25 '10 at 6:18
@Sirish Kumar: Not really possible under *NIX permissions. – amphetamachine Jun 25 '10 at 7:25

With the base unix permission system it's not possible for files or folders to have multiple groups. The one hackish way I could think of is to have a pam module that adds users of the other groups to these folders groups on login. Maybe could be used for this.

I don't think it's a good idea but could be worth a try. And this assumes you have root access.

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.