Open Upload

Setup

What is Open Upload

Open Upload is a PHP application to create a private / public file download server.

It's Very usefull when you need to distribute some files with ACL on it, and with an existant User/Password infrastructure (authorization and authentication)

You can see the official web site of OpenUpload

Install

Create a virtual host in your web server with php supprt enable.

Download the tar ball archive from site or from svn and setup the web server for serving it, like usual.

For this install we need some requirements.

  • A web server like apache, or lighttpd
  • A server database like Mysql or Postgresql
  • PHP5 with database, gd,ldap support.

Setup

Download the sources

I prefer use latest dev system, but you can also use stable tar ball from the sourceforce web site.

I will present how i work on my server, it's just a convention, but it s nice.

mkdir -p /data/Tools/sources
cd /data/Tools/sources
svn co https://openupload.svn.sourceforge.net/svnroot/openupload/trunk openupload

you can play and use it as is, but it will be better if your production copy is more stable.

Create an export from svn

It's a very bad idea to serve with your web server a source repository, very bad idea.

mkdir -p /data/Tools/RootApplications
cd /data/Tools/RootApplications
svn export  /data/Tools/sources/openupload /data/Tools/RootApplications/openupload

With these commands, i create a copy (like a snapshot) of the repository (without svn dot files).

Setup the Apache config

It's an usual vhost with this specific directive.

Listen 80
<VirtualHost *:80>
        ServerName openupload.my.zone.tld
        ServerAlias openupload
        DocumentRoot /data/Tools/RootApplications/openupload/www
        <Directory /data/Tools/RootApplications/openupload/www>
                Options None
                AllowOverride AuthConfig
                Order allow,deny
                allow from all
        </Directory>
  ErrorLog /var/log/apache2/openupload_error.log
  LogLevel warn
  CustomLog /var/log/apache2/openupload_access.log combined
  ServerSignature On
</VirtualHost>

Of course you can(must) change access rules.

Configure

The config file

First, check the directory's permissions.

  • /data/Tools/RootApplications/openupload directory have restrict access
  • data, data/tmp and templates_c must be writable by the web user

after edit www/config.inc.php.example to suite your needs, at the beginning, you must change these parameters.

  • INSTALL_ROOT
  • WWW_SERVER
  • database parameters

There are many others parameters like ldap, or logging, it depends if you want it or not. In my setup, the credentials are served by an AD (active directory), so i use ldap as auth module.

The database

Like usual

  • create the database and user access (boring)
  • import the schema onto this new database sql/mysql/1_schema.sql and sql/mysql/2_base.sql
  • import if needed the configuration mode sql/mysql/3_mode_<selected>.sql

The web setup

Like usual, got to http;//openupload.my.zone.tld/ and login with admin/admin as credential.

you can now modify the setup in the profile section.

Conclusion

Enjoy the tools.

You can now play with it, and make some better setup if you want.