How to install ProFTPd Administrator 1.3
Introduction
The installation of proftpd administrator needs some handy work. You should be familiar with your *nix shell. The installation requires a apache with php enabled, a mysql database.
Details
Download the latest stable archive of proftpd administrator from the download section and untar it.
Setup of mysql database:
- You need to edit misc/database_structure_mysql/db_structure.sql. In line 89 to 94 replace each test at the end of the line by the password for the mysql database for proftpd administrator. In line 97 replace the test123 with a different password. The second account is used by the web interface for regular ftp-uses to display their quotas. This user has only read rights on some tables.
- execute the mysql script via mysql -u root -p < misc/database_structure_mysql/db_structure.sql
Setup Webinterface:
- Copy the following directories to apaches data directory (the www directory): admin and userView
- Copy the configuration.xml to a directory accessible by the web server, but not accessible via the web server so that no user can download the file.
- Edit the configuration.xml: You need to change the password in line 10 to the first password you set in the db_struture.sql file and maybe you need to change the IP of the mysql server if it is not running on localhost. Additionally check the lines 52 - 70 regarding the correct paths to the command.
- You need to set the Path to the admin directory in the admin/include_rootpath.php (2. line) and in the 3. line the path to the configuration file.
- Open the userView/index.php and change line 12 - 13 so that the correct password is set (this is the second password you choose in the db_structure.sql) and your database host.
- Before we can setup an administrator account the following Perl modules need to be installed: Term::ReadKey, XML::Simple, DBD::mysql. I suggest to use your OS package manager to install these, because if you have no experiences with cpan, it can be tough. Otherwise just run cpan -i Term::ReadKey XML::Simple DBD::mysql
- Now you need to edit scripts/rootpath.pl. Set the correct path to your configuration.xml file in the 1. line, including its name.
- The last step is to configure your proftpd. You find an example configuration in misc/proftpd. this includes three files: proftpd.conf, include_mysql.conf and modules.conf. In the proftpd.conf you need to set your IP address and port. Additionally, you can activate TLS or configure additional modules. * In the include_mysql.conf you need to set the mysql credentials for the database. This is done in line 13, change test to your password you choose in db_structure.sql.
- Now start the proftpd server. Depending on your proftpd installation you need to edit the modules.conf file to deactivate not installed modules or to adjust the ModulePath.
- You can change the language of the userView frontend by editing the index file and including a different language file.
Now you can setup an administrator accoutn via the perl script scripts/createAdmin.pl . Afterthe creation of the administrator account, you can login into the webinterface
*http://yourserver/admin *
Normal ftp users can login via
http://yourserver/userView
to see their quotas.