[K12OSN] moving a file to a setgid directory not changing file's group

Petre Scheie petre at maltzen.net
Wed Feb 21 00:48:11 UTC 2007


I have a shared directory, /home/classroom, which is setgid.  In this 
case I have clients that autologin, so documents created on ws001 one 
day need to be editable on ws002 on another day.  If the kids save the 
file directly in /home/common, the group for the file is set to the same 
group as that of /home/classroom, in this case, the group name is 
classroom.  However, if a student saves the file in the homedir first 
and then, via nautilus, drags the file to the /home/classroom folder, 
the group permissions are not changed to classroom but remain that of 
the autologin of the given workstation.  This means the file can only be 
edited at the same workstation as where it was created, not what I want.

I've been doing shared directories on Unix for 10+ years, and I never 
noticed this, that the setgid of a directory is ignored if a file is 
moved to that directory.  Copying or creating directly the file works 
just fine, it's just the moving that's a problem.  Or am I just missing 
something or do I not have the permissions set correctly?

Petre




More information about the K12OSN mailing list