[Samba] group and user permissions issue.

Ian Warburton samba at irax.com
Tue Jun 22 17:37:18 GMT 2004


I have browsed through loads of archive material and cant seem to find
anywhere where this exact issue has been posted.

 am using samba 2.28 set up as an NT domain, there are no problems with
the general configuration. My issue is witb samba not following the
permissons I have set on files in a shared directory.
Purpose: set up a directory for students and teachers where students can
leave files and only edit their own files, teachers can edit all files.

unix permissions for files are like this
-rwxrw----    1 student1 teachers        6 Jun 22 18:22 S1.txt*
-rwxrw----    1 student3 teachers       17 Jun 22 18:21 S3.txt*
-rwxrw----    1 student3 teachers        8 Jun 22 18:21 student3.txt*

therefore students can edit their own files and teachers in the group
teachers can also edit the files.


I create a share in samba ie:

[Student_GiveWorkIn]
        user = %U
        path = /home/Give_work_in
        create mode = 750
        write list = %U
        only user = yes
        force group = teachers

this works however students using this share can edit each others files. 
if I set the permissions to :

-rwxr-----    1 student1 teachers        2 Jun 22 16:34 S1.txt*
-rwxr-----    1 student3 teachers        8 Jun 22 17:12 S3.txt*
-rwxr-----    1 student3 teachers        0 Jun 22 15:39 student3.txt*

then students can edit their own files and no one elses, but the teachers
group can't  edit them either ie chmod g+w  seems to mean that samba gives
group access to the students as well as the teachers, when only the
teachers should have access.

I am at a loss to explain this behaviour.

Ian





More information about the samba mailing list