Linux Question

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

Thanks
Josh
Jack_son_Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

badwolfffCommented:
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.
0
Jack_son_Author Commented:
That is good, although can you do this without using an acl?
0
badwolfffCommented:
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:
http://manpages.ubuntu.com/manpages/saucy/man1/getfacl.1.html
and
http://manpages.ubuntu.com/manpages/precise/man1/setfacl.1.html

You might find this very useful:
https://help.ubuntu.com/community/FilePermissionsACLs
and this:
http://www.tecmint.com/secure-files-using-acls-in-linux/
0
TobiasHolmCommented:
>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).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.