[Samba] Strange permissions problems

Scott Mayo sgmayo at mail.bloomfield.k12.mo.us
Thu Aug 24 01:39:18 GMT 2006


I had this problem some last year and never got it figured out.  Now it 
is bugging me.  It seems that sometimes when a student writes his/her 
file to a directory, it will not keep the correct group.  It puts 
his/her main group as the group owner and that fouls things up.  Here is 
what I have.

Unix Permissions
/school						3777	admin.teacher
/school/bhs					3777	admin.teacher
/school/bhs/reese				3777	reese.teacher
/school/bhs/reese/6thhour			3777	reese.teacher
Now rosie creates her first directory in ....6thhour
/school/bhs/reese/6thhour/rosie			3770	rosie.teacher
/school/bhs/reese/6thhour/rosie/word		3770	rosie.teacher
/school/bhs/reese/6thhour/rosie/word/chap1	3770	rosie.teacher

Samba share that rosie gets:
[school]
path = /school/bhs
read only = no
valid users = @teacher @admin @bhs
create mask = 660
force create mode = 2660
directory mask = 770
force directory mode = 3770

So here is how it goes.  Rosie can make directories-files below 
.../6thhour (she is in the bhs group).  Everything seems fine and dandy. 
  All folders-files are getting permissions that they should so that 
rosie and the teacher (all teachers are in the teacher group) are the 
only ones able to see anything in the folder that she created 
(.../rosie).  Then when she gets down to the chap1 directory and puts a 
file in it, the file has the user and group rosie.bhs (bhs is her main 
group).

Now suddenly the teacher cannot access the files since she is not in the 
bhs group.  Any idea why this is not pulling down the teacher group with 
the files since I have the bit set to keep the group of the directory? 
It pulled it down in the directories above (all files above had the user 
group rosie.teacher), but it seems that it quit when it go this deep in 
the directories.

One other thing that is strange, is that some of them do have the user 
group correct.  There are 2 files in the .../chap1 directory that have 
the user and group rosie.teacher just like they should.

I logged on with her username just to test this and the files that I 
saved had the user and group rosie.bhs.

Thanks for any help.


-- 
Scott Mayo
Technology Coordinator
Bloomfield Schools
PH: 573-568-5669
FA: 573-568-4565
Pager: 800-264-2535 X2549

Duct tape is like the force, it has a light side and a dark side and it
holds the universe together.


More information about the samba mailing list