The way I have handled this is I put a icon (application) on every students desktop which they drag the file to.  This launches a script that sets the permissions of the file to 755 and then copies it to the drop box folder.  It pops up a message box saying the file was copied successfully (visual feedback is nice).  Haven't yet experimented with having the script determine which class a student is in and consequently which dropbox subfolder to copy to.  Otherwise, the directory permissions is set as James mentioned. which makes it a one-way trip for the students' files.  It seems to work ok at present.
<br><br>Sincerely,<br>Dave Hopkins<br><br><br><div><span class="gmail_quote">On 3/4/07, <b class="gmail_sendername">James P. Kinney III</b> <<a href="mailto:jkinney@localnetsolutions.com">jkinney@localnetsolutions.com</a>
> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">OK. A quick test was done.<br><br>Make the directory group writeable and set the file mask for that
<br>directory to make all files -w- for the group. The teacher can still<br>read and move the files but students can only drop them. They can't copy<br>them or list them.<br><br>Anything a bunch of kids can dream up, a dedicated bunch of old farts
<br>can squash.<br><br>:)<br><br>On Sun, 2007-03-04 at 20:59 -0600, Petre Scheie wrote:<br>> It's not as convenient, but perhaps you could give each student her/his<br>> own directory within /home/inbox, with permissions set to 770, and put
<br>> the teacher into each student's primary group so the teacher can get to<br>> the files.  Give each student's directory the same name as the student's<br>> ID, e.g., bob's directory would be /home/inbox/bob.  Modify your script
<br>> so that is automatically uses the caller's ID to specify the path to the<br>> directory.  This way, only the student and the teacher have access to<br>> that student's work.  It would be harder to hunt through all the
<br>> directories for the students' work, but you could write a script that<br>> parses through all those directories and moves any files found to one<br>> folder in the teacher's $HOME.  Give the teacher an icon to call it with
<br>> sudo, call it something like "Gather up handed in assignments".<br>><br>> HTH<br>><br>> Petre<br>><br>> Robert Arkiletian wrote:<br>> > mkdir /home/inbox<br>> > chmod 1773 /home/inbox  (Not readable by others and sticky bit
<br>> > prevents overwriting)<br>> ><br>> > But if a clever kid happens to know the filename of another kid<br>> ><br>> > cp /home/inbox/filename ~<br>> ><br>> > unfortunately works. Not good.
<br>> > ==============================<br>> > My solution:<br>> > Write a 1 line bashscript /usr/bin/handin<br>> ><br>> > cp -p $1 /home/inbox/<br>> ><br>> > chgrp teacher /usr/bin/handin
<br>> > chmod 2755 /usr/bin/handin   (setgid escalate priviliges to teacher group)<br>> ><br>> > now<br>> ><br>> > chgrp teacher /home/inbox<br>> > chmod 1770 /home/inbox<br>> ><br>
> > To hand-in a test students go<br>> > handin filename<br>> ><br>> > But it does not work. I get<br>> ><br>> > cp: cannot stat `/home/inbox/filename': Permission denied<br>> >
<br>> > Why? Apparently, setgid cannot change the group of the process to one<br>> > which you don't already belong to. So I have to add the teacher group<br>> > to all students, which defeats the purpose. So much for privilege
<br>> > escalation of setgid. I even tried using setuid.<br>> ><br>> > [root@server ~]# ls -ld /home/inbox/<br>> > drwxrwx--T  2 root root 4096 Mar  4 16:02 /home/inbox/<br>> > [root@server ~]# ls -l /usr/bin/handin
<br>> > -rwsr-xr-x  1 root root 79 Mar  3 14:40 /usr/bin/handin<br>> ><br>> > I get the same stat Permission denied error. Any suggestions?<br>> ><br>> ><br>><br>> _______________________________________________
<br>> K12OSN mailing list<br>> <a href="mailto:K12OSN@redhat.com">K12OSN@redhat.com</a><br>> <a href="https://www.redhat.com/mailman/listinfo/k12osn">https://www.redhat.com/mailman/listinfo/k12osn</a><br>> For more info see <
<a href="http://www.k12os.org">http://www.k12os.org</a>><br>--<br>James P. Kinney III<br>CEO & Director of Engineering<br>Local Net Solutions,LLC<br>770-493-8244<br><a href="http://www.localnetsolutions.com">http://www.localnetsolutions.com
</a><br><br>GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)<br><<a href="mailto:jkinney@localnetsolutions.com">jkinney@localnetsolutions.com</a>><br>Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7
<br><br>_______________________________________________<br>K12OSN mailing list<br><a href="mailto:K12OSN@redhat.com">K12OSN@redhat.com</a><br><a href="https://www.redhat.com/mailman/listinfo/k12osn">https://www.redhat.com/mailman/listinfo/k12osn
</a><br>For more info see <<a href="http://www.k12os.org">http://www.k12os.org</a>><br><br></blockquote></div><br>