[K12OSN] OT: need help configuring web server on Ubuntu Server to allow file uploads

Peter Scheie peter at scheie.homedns.org
Mon Apr 23 14:51:29 UTC 2007


If you don't care about the specific URL people have to use to get to that teacher's web 
files, you could enable the UserDir part in apache.

Even if you do care about the URL, i.e., you want to use a specific URL and not 
~/public_html, just create a group for /var/www/html on the webserver, set the group 
sticky bit for /var/www/html so that all files placed there are owned by the group 
assigned to /var/www/html, and then apache should have no trouble reading the files.

Another thing to look at would be writing a script for this teacher that runs sshfs to 
connect to the web server, and then calls, say, thunar to give GUI access to the 
mountpoint.  To the teacher, it will appear that any file he puts under the mountpoint 
will end up on the webserver.

Petre

David Whitmer wrote:
> Our school has a small public web server (Ubuntu Server 7.04 with its
> LAMP setup), separate from our main web site, just to play around with
> learning Apache and related things.
> 
> I want to configure this web server to allow one of our teachers to
> easily manage files in one of the web server's folders (e.g.
> /var/www/classprojects ).  By "easy", I mean being able to open up a
> graphical SSH connection (whether with WinSCP in Windows or "Connect
> to SSH server" in Gnome) and just drag-and-drop files/folders to copy
> them to the designated web server folder, and have all the file
> permissions automatically work so that the general web browsing public
> would not have any problems viewing whatever this teacher uploads.
> 
> I have already done a lot of searching, both with Google and in the
> Ubuntu forums, and feel like I'm getting the runaround, in that the
> advice I have found so far typically sounds like "just install vsftp"
> or "just set the file permissions" and then "everything will just
> work".  But it doesn't for me.  At least, not so that the file
> permissions work automatically, i.e., telling the teacher that after
> uploading the files, their permissions would then need to be changed
> so the public can view them, would not be acceptable.
> 
> I'm sure I'm overlooking something obvious.  But I do not know what.
> 
> Does anyone have any ideas on what I can or should do to be able to
> implement my goal?
> 
> Or maybe a better question might be... What would you all consider to
> be a "best practice" when configuring a public web server on which you
> want to allow specific users to be able to upload whatever files they
> want to the web server, but without requiring that they execute
> chown/chmod post-upload so the public can view those files?
> 
> Even just pointing me to an Internet site that would answer my
> questions would help immensely.
> 
> Thanks!
> 
> David Whitmer
> Director of Media & Technology
> Calvary Schools of Holland (Michigan)
> web: www.calvaryschoolsholland.org
> email: thewhitmers at gmail.com
> 
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
> 




More information about the K12OSN mailing list