Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
the problem is, i have a Linux Centos 5.2 machine, there are 3 directories named Test1, Test2 and Test3. The directory permissions and ownership are as follows
Code:
drwxr-x--- 2 Opr Group1 4096 Jan 22 17:54 Test1
drwxr-x--- 2 Opr Group2 4096 Jan 22 17:54 Test2
drwxr-x--- 2 Opr Group3 4096 Jan 22 17:54 Test3
"Opr" is the user who owns these directories and Opr is the member of group "admins", Only "Opr" is allowed to read-write on all 3 directories.
There are other users in the groups Group1, Group2 and Group3 who have read-only rights on their respective directory, such as Group1 users have read-only access to Test1, Group2 users have read-only access to Test2 and Group3 users have read-only access to Test3, as shown above.
Now, If i want that another user named "Opmgr" can have read-write access on all 3 directories like "Opr" user, but read-only users (i.e. users in Group1,Group2,Group3) scenario must remain same as explained, than what should i do?
Man, i think u havent got the idea, actually i dont want any other user to enter the directory other than its group, if i add Oprmgr to the read-write group and then set that group as the owner of those 3 directories, than no user other than these 2 will be able to access the directories until i set the permissions 775 which is 770 now (which will allow all users to access all the directories read-only, which i dont want).
@Jschiwal
hmmm facls i think would be a gud idea, i will work on tht and will share it here. Thanks
Man, i think u havent got the idea, actually i dont want any other user to enter the directory other than its group, if i add Oprmgr to the read-write group and then set that group as the owner of those 3 directories, than no user other than these 2 will be able to access the directories until i set the permissions 775 which is 770 now (which will allow all users to access all the directories read-only, which i dont want).
@Jschiwal
hmmm facls i think would be a gud idea, i will work on tht and will share it here. Thanks
I think you are the one that "has no idea". I never said to add him to the other users group. If you never plan on adding another user with the same types of permissions as opmgr then you should read the chmod man page.
@affinity, cmon man, read my 1st post carefully, Jschiwal has got my idea and he suggested me the right thing (for which i am thankful to him),
@Jschiwal
Thanks man, i have done it with the facl thingie, i have added the rule in the ACL as
Code:
setfacl -m u:oprmgr:rwx Group1/
so now "oprmgr" has the read-write access on Group1/ dir, woohoo!
Yea, after seeing this I did not understand what you wanted to do. That is a useful tool, I was not aware that the normal chmod was unable to set permissions for individuals on a file, which I realized after taking my own advice and reading through it's man page.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.