[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[K12OSN] Hand-in directory permissions



I set up a drop box (hand in) dir by
mkdir /home/inbox
which now has owner and group set to root
chmod 1773 /home/inbox
which allows writing and sets the sticky bit for others.
Even if they know the filename of another student they can't delete it BUT,
they can
cp /home/inbox/filename ~
if they know the filename.
Any way to prevent this?
BTW my umask is the default 0002

Possible solution?
The only thing I can think of would be to write a tiny script (handin)
like this
cp -p $1 $2
where $1 is the filename, $2 is the dropbox dir, command line args
The handin script would have to have perm 2755 (setgid)
and have owner root and group teacher.
chmod 2775 handin
chown root:teacher handin
Then set the perm for the dropbox dir /home/inbox to 1730
owned by root with group teacher.
chmod 1730 /home/inbox
chown root:teacher /home/inbox
Then ask students to
handin filename /home/inbox
Haven't tested this yet, any suggestions?
--
Robert Arkiletian
Eric Hamber Secondary, Vancouver, Canada
Fl_TeacherTool http://www3.telus.net/public/robark/Fl_TeacherTool/
C++ GUI tutorial http://www3.telus.net/public/robark/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]