Graphical User Interface for ProFTPd with MySQL and sqlite3 support
© 2004 The Netherlands, Lex Brugman lex_brugman@users.sourceforge.net
© 2012 Christian Beer djangofett@gmx.net
© 2015 Ricardo Padilha ricardo@droboports.com
Published under the GPLv2 License (see LICENSE for details)
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, download from http://www.gnu.org/licenses/gpl-2.0.txt
This GUI for ProFTPd was written to support a basic user management feature when using the SQL module. Originally written by Lex Brugmann in 2004 it was updated by Christian Beer in 2012 to support the latest PHP version.
There is no build-in security, so you have to protect the directory with something else, like Apache Basic Authentication.
This software will be rewritten over time and will be object-oriented and equipped with unit tests at the end.
A lot ;) so help is very much appreciated
As the software has undergone a complete rewrite of the config file you should not overwrite your old config.php and compare and change values manually.
- Install ProFTPd with MySQL support
- Debian: apt-get install proftpd-mysql
- Gentoo: USE="mysql" emerge proftpd
- Create a MySQL database (use something like phpMyAdmin for this), for example: "proftpd".
- Use tables.sql to populate the database (you can use phpMyAdmin for this).
- Add the following to your proftpd.conf (edit to your needs):
AuthOrder mod_sql.c
SQLBackend mysql
SQLEngine on
SQLPasswordEngine on
SQLAuthenticate on
SQLAuthTypes SHA1
SQLConnectInfo database@localhost username password
SQLUserInfo users userid passwd uid gid homedir shell
SQLGroupInfo groups groupname gid members
SQLUserWhereClause "disabled != 1"
SQLLog PASS updatecount
SQLNamedQuery updatecount UPDATE "login_count=login_count+1, last_login=datetime() WHERE userid='%u'" users
# Used to track xfer traffic per user (without invoking a quota)
SQLLog RETR bytes-out-count
SQLNamedQuery bytes-out-count UPDATE "bytes_out_used=bytes_out_used+%b WHERE userid='%u'" users
SQLLog RETR files-out-count
SQLNamedQuery files-out-count UPDATE "files_out_used=files_out_used+1 WHERE userid='%u'" users
SQLLog STOR bytes-in-count
SQLNamedQuery bytes-in-count UPDATE "bytes_in_used=bytes_in_used+%b WHERE userid='%u'" users
SQLLog STOR files-in-count
SQLNamedQuery files-in-count UPDATE "files_in_used=files_in_used+1 WHERE userid='%u'" users
- Extract all files to your webspace (into a subdirectory like "proftpdadmin").
- Secure access to this directory (for example: create a .htaccess file if using apache)
- Edit the configs/config_example.php file to your needs and rename it to config.php.
- Start ProFTPd.
- Go to http://yourwebspace/proftpdadmin/ and start using it!
- Install ProFTPd with sqlite3 support
- Use tables-sqlite3.sql to create an sqlite3 database:
sqlite3 auth.sqlite3 < tables-sqlite3.sql
- Add the following to your proftpd.conf (edit to your needs):
AuthOrder mod_sql.c
SQLBackend sqlite3
SQLEngine on
SQLPasswordEngine on
SQLAuthenticate on
SQLAuthTypes pbkdf2
SQLPasswordPBKDF2 sha1 5000 20
SQLPasswordUserSalt name Prepend
SQLPasswordEncoding hex
SQLConnectInfo /path/to/auth.sqlite3
SQLUserInfo users userid passwd uid gid homedir shell
SQLGroupInfo groups groupname gid members
SQLUserWhereClause "disabled != 1"
SQLLog PASS updatecount
SQLNamedQuery updatecount UPDATE "login_count=login_count+1, last_login=datetime() WHERE userid='%u'" users
# Used to track xfer traffic per user (without invoking a quota)
SQLLog RETR bytes-out-count
SQLNamedQuery bytes-out-count UPDATE "bytes_out_used=bytes_out_used+%b WHERE userid='%u'" users
SQLLog RETR files-out-count
SQLNamedQuery files-out-count UPDATE "files_out_used=files_out_used+1 WHERE userid='%u'" users
SQLLog STOR bytes-in-count
SQLNamedQuery bytes-in-count UPDATE "bytes_in_used=bytes_in_used+%b WHERE userid='%u'" users
SQLLog STOR files-in-count
SQLNamedQuery files-in-count UPDATE "files_in_used=files_in_used+1 WHERE userid='%u'" users
- Extract all files to your webspace (into a subdirectory like "proftpdadmin").
- Secure access to this directory (for example: create a .htaccess file if using apache)
- Edit the configs/config_example.php file to your needs and rename it to config.php.
- Start ProFTPd.
- Go to http://yourwebspace/proftpdadmin/ and start using it!
Lex Brugman for initiating this project
Justin Vincent for the ezSQL library