[SOLVED] Permissions for a Directory depending on what group (GID) user is in
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Permissions for a Directory depending on what group (GID) user is in
Hi I'm running: Linux version 2.6.16.60-0.59.1-smp (gcc version 4.1.2 20070115 (SUSE Linux)) #1 SMP
Not sure if that's relevant or not. Sorry for the eye roller, but I've done some googling and it seems like I want the 'chmod' command, but I can't figure out exactly what I need to do.
I have two user groups, 4100 and 4200.
I want 4100 to have read/write/execute/delete access to a particular directory, and I want 4200 to only have read access to a directory. I've been fighting this for a couple of hours, I'd appreciate some direction.
A directory in Unix can only be owned by one group. If the directory is owned by 4100, you can give that group r/w/x permissions, but members of 4200 would then have the same rights as every other non-member of 4100.
The above is true for the standard Unix permission model, and it cannot handle a scenario like the one you presented. What you probably want, is a filesystem feature called Access Control Lists (ACLs). man mount and man fstab will tell you how to enable ACLs on your filesystem, and man setfacl will tell you how to create and manipulate ACLs.
you need to use chmod to change/set permissions and chgrp to change group
_____________________________________
If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post.
Happy with solution ... mark as SOLVED
(located in the "thread tools")
[QUOTE=pan64;4688267]you need to use chmod to change/set permissions and chgrp to change group
OK. When I go through chmod manual pages, I'm not sure exactly what I'm looking for to accomplish this. I understand this is some serious hand holding, but how exactly do I do this? The directory is already the appropriate group.
you can test it easily I think, as you described it should be ok.
_____________________________________
If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post.
Happy with solution ... mark as SOLVED
(located in the "thread tools")
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.