HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Tips/Tricks/Mods (
-   -   FTP Backup manager ( 27th April 2011 15:10

FTP Backup manager
5 Attachment(s)
Hi everyone,

Because of the mirror issues as written in I started a new little project based on Virtual Hosting With PureFTPd And MySQL (Incl. Quota And Bandwidth Management) On Debian Etch.
The installation instruction are for Debian Etch but works also for Debian Lenny.

I created a web interface for the FTP Backup server so phpmyadmin is not needed anymore, the interface and ftpserver is tested for several days and seems bug free.

Follow the installation instuctions written by Falko but use the MySQL.txt file provided in the zip to populate the MySQL database.

Change the MySQL password in inc_connect.php and upload the php files into the root of the webserver (/var/www)

when connecting the webserver shows a loginscreen:

Username: ftp-admin
Password: ftp-admin

You can change the admin password when logged on.

remark: the delete option deletes the user without question!

The files are modified and the zip is updated

Ben 27th April 2011 15:27

Looks cool.

But one thing you should check is for some vulnerabilities, e.g. XSS, SQL Injection create_FTP_user.php, just as an example, as the script is lacking input validation and output masking, a.o.. 27th April 2011 15:42

I agree, I did protect granted.php for a MySQL injection but I forgot the other files :(
Tonight I'll modify the other files and upload the zip again.


Ben 27th April 2011 17:47

But don't forget about Cross Site Scripting and others, as well ;) 27th April 2011 18:48


In basic if not logged on there is no possibilty to run one of the other scripts, validation is done at the beginning of every script:


then the MySQL injection is checked:

$User = stripslashes($User);
$Password = stripslashes($Password);
$User = mysql_real_escape_string($User);
$Password = mysql_real_escape_string($Password);

and the password is encrypted:


at last the session is registered:


Did I miss something or better, is there something that can make the script better?
Please advise!

Ronald 28th April 2011 02:25

The files are modified and more secure, thanks to Ben for his advice.

The zip in the first post is updated 4th May 2011 02:14

Added a installation manual for Debian Lenny (see first post)

Ben 4th May 2011 15:56


In basic if not logged on there is no possibilty to run one of the other scripts, validation is done at the beginning of every script:
Every trustfull user might be untrustfull or used by a victim when logged in A and surfing B while beeing the victim of a XSS Attack combined with CSRF to attack A... ;)

All times are GMT +2. The time now is 20:17.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.