Q:

How web-hosting providers manage to make uploading files secure?

I made a small website where people can upload their files into my server.
Every member have their own folder and they can't open or show other people directories.
Their links looks like this:
example.com/sub/james/
example.com/sub/mark/
example.com/sub/jason/
Members have an option to uploud php, java, html or any kind of file they want.
I made it like that because I want to give the ability for them to host a tiny website on my server, so for example if someone reach this link:
example.com/sub/mark/index.php
It will open their home page. and anyone on internet can access that page, also no one can go back behind the main "sub" folder
I'm concerned about the security, "giving access to my server and let members upload any kind of file" what could go wrong? and how I can make it more secure?

A:

I suggests to use a different user by user on Web server (see Apache-ITK). This will allow each user to not browse all the names and go in the other users.
You must think also about CPU and RAM : you will maybe forced to use a limit by user.
Concerning disks, quotas are welcome.
Don't forget the max execution time to not allow them to run every time process
If you use PHP, remove all the execution of system programs in disable_functions.
After that, you will enable logs by users.
Do not forget the backups !
And maybe a database server if you need...
It can be interersting to limit the network connection from this host to Internet, if the user forget to update its prefered CMS
Good luck and welcome in shared hosting.

