Linux Question

Posted on 2014-08-17
Last Modified: 2014-09-01
I am trying to do permissions to a folder for multiple groups, each will have different permissions to the directory. Can you let me know how to do this without using ACL's?

Group 1 RW
Group 2 R
Group 3 RWX

Question by:Jack_son_

    Assisted Solution

    On ubuntu if you want to restrict access to only two groups say Group01 full access and Group02 having only read only access, In this case you can use file access control list (ACL). (In your case I think itis the best solution)

    setfacl -R -m g:Group01:rwx Folder01
    setfacl -R -m g:Group02:r-- Folder01
    You can verify changes via getfacl Folder01.And you can remove all permissions for others like this chmod -R o-rwx Folder01

    So by this your folder is only accessible via Group01 ( full access ) and Group02 (read only access) and no doubt owner of that folder can also access that folder.

    Author Comment

    That is good, although can you do this without using an acl?

    Assisted Solution

    As far as I know it that is that only way. You can make a directory belong to multiple groups by mounting the relevant partition with POSIX Access Control Lists (ACL) activated.

    The programs to work with ACLs, once the file system is mounted to support them, are getfacl and setfacl:

    You might find this very useful:
    and this:
    LVL 18

    Accepted Solution

    >how to do this without using ACL's?

    Not possible in standard Linux/ext-fs (afaik). You'll need ACL or use another system (like Microsoft AD/Samba).

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now