Instant File Hosting with a Simple PHP script

Dmitri Popov

Productivity Sauce

Jan 14, 2013 GMT
Dmitri Popov

Not comfortable with hosting images and files using third-party services? If you already have a Linux server, then you can easily turn it into a no-frills file hosting solution using a PHP script from Download the script and change the default password in it. Rename then the script to index.php, create a separate directory for it on your server (e.g., uploads), and upload the script into it. Use then the chown -R www-data uploads command to make the uploads writable by the server, and you are done.

Point your browser to (replace with the actual IP address or domain name of the server), and you should see a simple upload form. Use it to upload the files and images. By default, all uploaded files are stored in the separate files directory, and if you can't view its contents in the browser, you have to make it writable using the chmod -R 777 files command.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More