It is about as basic as you can get.  I created a script called copy_files_to_dropbox and put it /usr/sbin with a+x permissions.<br><br>The launcher executes the script passing the filename to the script.  Then, neglecting the code for popping up the confirmation window, the script presently is just
<br><br>chmod 755 $1<br>cp $1 /Dropbox_directory/.<br><br>The confirmation window simply says the file was copied after testing that the file exists, but I forget the exact syntax. See Eric's push_icons script since that is what I used as the basis for it.
<br><br>There are probably all kinds of reasons to worry permissions on the student's files and such, but in our 5-8 environment, I haven't worried too much about them (yet?).  And, I have backups so anything over 24 hours old is archived (via rsync) and then NFS mounted (ro with permissions retained) with another desktop icon (called backups) showing so the user can browse to an old file if needed.
<br><br>Sincerely,<br>Dave Hopkins<br><br><br><div><span class="gmail_quote">On 3/5/07, <b class="gmail_sendername">Petre Scheie</b> <<a href="mailto:petre@maltzen.net">petre@maltzen.net</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;">
Just out of curiousity and for the record, could you post the script your icon launches?<br>   I've done some similar things, but I always like to see how others do it.  Thanks.<br><br>Petre<br><br>David Hopkins wrote:
<br>> The way I have handled this is I put a icon (application) on every<br>> students desktop which they drag the file to.  This launches a script<br>> that sets the permissions of the file to 755 and then copies it to the
<br>> drop box folder.  It pops up a message box saying the file was copied<br>> successfully (visual feedback is nice).  Haven't yet experimented with<br>> having the script determine which class a student is in and consequently
<br>> which dropbox subfolder to copy to.  Otherwise, the directory<br>> permissions is set as James mentioned. which makes it a one-way trip for<br>> the students' files.  It seems to work ok at present.<br>
><br>> Sincerely,<br>> Dave Hopkins<br>><br>><br>> On 3/4/07, *James P. Kinney III* <<a href="mailto:jkinney@localnetsolutions.com">jkinney@localnetsolutions.com</a><br>> <mailto:<a href="mailto:jkinney@localnetsolutions.com">
jkinney@localnetsolutions.com</a>> > wrote:<br>><br>>     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<br>>     her/his<br>>      > own directory within /home/inbox, with permissions set to 770,
<br>>     and put<br>>      > the teacher into each student's primary group so the teacher can<br>>     get to<br>>      > the files.  Give each student's directory the same name as the<br>>     student's
<br>>      > ID, e.g., bob's directory would be /home/inbox/bob.  Modify your<br>>     script<br>>      > so that is automatically uses the caller's ID to specify the path<br>>     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<br>>     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
<br>>     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<br>>     to one<br>>      > > which you don't already belong to. So I have to add the teacher<br>
>     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> <mailto:<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> <<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> <mailto:<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> <mailto:<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>>     <<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>><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>_______________________________________________<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></blockquote></div><br>