[K12OSN] Dropbox question

Calvin Dodge caldodge at gmail.com
Wed Dec 20 13:52:54 UTC 2006

On 12/20/06, dahopkins at comcast.net <dahopkins at comcast.net> wrote:
> I found the instructions.
> http://riv-mail.mesd.k12.or.us/mailarchives/k12osdig/7494.html and also
> at http://www.redhat.com/archives/k12osn/2004-April/msg00774.html   for creating a dropbox, but ...
> While it works for dropping the files to the folder, how do I ensure that the ownership of the files is set to the owner of the directory, and/or that the permissions are set so that the owner of the directory can then read the files?

I don't think you can set ownership in that way.  If the file-dropping
user belongs to the group owner of the directory, then you can set
default GROUP ownership by making the directory setgid (chmod g+s

But ... I think that applies only to files which are created in the
directory, not files which are copied to it. (try it to see if that's
how it works for you)

My simpleminded fix would be to set a cron job to run periodically
(even every minute, I suppose).  Something like:

find DIRECTORY -type f -print0|xargs -0 --no-run-if-empty chown TEACHER


find DIRECTORY -type f -print0|xargs -0 --no-run-if-empty chmod 740


More information about the K12OSN mailing list