LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to give access rights to one group to the home-dirs of another group (https://www.linuxquestions.org/questions/linux-networking-3/how-to-give-access-rights-to-one-group-to-the-home-dirs-of-another-group-499901/)

Peter@KKVS 11-08-2006 08:34 PM

How to give access rights to one group to the home-dirs of another group
 
Hi
I'm using samba 3 on Ubuntu as stand alone server for network of xp machines.

I need to give teachers the rights to access the pupils home_dirs without giving students the ability to acess other students or teachers resources.
Teachers are in a group called "staff"
pupils are presently just in the default users group.

Pupils have their home-dirs in directories according to class eg /home/students/primary6/richard

I find if I use group permissions to give the staff access then the students cannot open their own home-dir. If I set permissions so that students can access their home dirs then teachers cannot access them.

I know it can be done - but how ????

dxqcanada 11-08-2006 08:53 PM

The home directory and subdirectories are owned by the user.
The group ownership is probably their own group.

If you change the group ownership to "staff" ... then all members of that group can access the directories and files.
Code:

# chgrp -R staff /home/xxxx
So the user will have access to their files because they are the owners ... the members of staff will have access based on their group permissions.

If you have problems with group permissions then look into the umask command, which you can set in the User's profile.

Peter@KKVS 11-09-2006 12:38 AM

Thanks, I tried that but users could not then access their own user dir as they are members of users group.
I got around it (probably not an ideal way) by adding
admin users = @staff in smb.conf for the student directory.


All times are GMT -5. The time now is 01:12 AM.