LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Quick users/groups question (https://www.linuxquestions.org/questions/linux-general-1/quick-users-groups-question-124072/)

Nico 12-08-2003 10:21 PM

Quick users/groups question
 
I have a web box I just reinstalled redhat 9 on. in the /var/www/html folder there are different folders for different clients. Each client has a login (e.g. bob, linda).

I only want bob to be able to access the bob folder and down and linda to be able to access the linda folder and down. However I want my login to be able to all of those folders.

bob and linda also have their own groups. I made a group called htmladmin.

Now if I chmod -R 750 bob only and chgrp -R bob bob and chown -R bob bob, bob should be able to access only his folder and linda won't be able to.

If I add the group bob and linda to the htmladmin group and then make my primary group htmladmin, I should be able to access both of their directories, correct?

Thanx

Nico

ToniT 12-08-2003 10:32 PM

I think you have to add yourself to the bob and linda group. Primary group is meaningless; you can temporarily change it (in effective sense) with newgrp command.

tisource 12-09-2003 01:18 AM

If you give owners full permission to their files/folders (chown -R <user>) and then make htmladmin the group (chgrp -R <group>) -- make sure your user is a member), then it should all work. If you were to do that, I would do chmod -R 770, which would give the owner full control, and the group (which you belong to), but no one else would be able to view anything.

That's my suggestion.


All times are GMT -5. The time now is 08:35 PM.