[K12OSN] Shared Folders

Petre Scheie petre at maltzen.net
Mon Nov 15 20:03:34 UTC 2004


No, you don't want the umask to be 666, especially for a shared folder.  umask 
indicates what rights are stripped away, so 666 would remove everyone's rights, 
even the owner's.  Umask is usually set to 022 or 002.  In your case, you want 
it to be 002.  This means no rights will be stripped away for user and group, 
but write permissions will be for other.

As to a shared folder, arrange for all the staff and students who have to share 
files to be in the same group; then set that group to be the group for the 
shared directory.  Then, set the sticky bit for the group for that directory. 
What that will do is assign the group of the directory to any files created in 
that directory, rather than the group of the user who created the file.

So, do this:

mkdir /shared
chmod 775 /shared
chgrp group1 /shared
chmod g+s /shared

And then add the relevant staff and students to the group1 group.  When those 
users create files in /shared, they group for those files will always be group1, 
even if that isn't the primary group for the person who creates the file.  But 
make sure the umask is set to 002; if it's 022, other members of the group1 
group won't be able to write to the files.

Petre

Shawn Powers wrote:
> Does anyone offer shared folders to staff/students?  If so, how do you 
> manage permissions so that everyone can read/write to the files?  Is 
> there a way to make a UMASK for a specific folder?  For a shared folder 
> to work right, it would have to have a UMASK of 0666, correct?  I am not 
> sure how to handle that with sticky bits, etc...
> 
> My current kludge is to have a cron job on my nfs server that runs 
> "chmod -R 666 /share" every minute.  Not pretty, and not immediate.
> 
> Thanks again for any insight,
> -Shawn




More information about the K12OSN mailing list