wiki:Pure-FTPd WebUI installation

beta 0.0.9

WebUI installation

Download src to web server root (/var/www, /var/www/html)

Ubuntu:

root@server:~# cd /var/www
root@server:~# git clone git://github.com/mazay/pure-ftpd-webui.git
root@server:/var/www# chown www-data:www-data -R /var/www/pure-ftpd-webui

CentOS:

root@server:~# cd /var/www/html
root@server:~# git clone git://github.com/mazay/pure-ftpd-webui.git
root@server:/var/www/html# chown apache:apache -R /var/www/html/pure-ftpd-webui

Database setup

Next steps are the same in different distributives. Create database and user pureftpd for connection to MySQL database:

root@server:~# mysql -u root -p
Enter password:

mysql> CREATE DATABASE pureftpd;

mysql> GRANT ALL PRIVILEGES ON pureftpd.* TO 'pureftpd'@'localhost' IDENTIFIED BY 'pureftpdpass';

Create neccesary tables in pureftpd database (sql files is in INSTALL folder)

root@server:~# mysql -u root -p pureftpd < pure-ftpd-webui_users-table_0.0.9.sql
Enter password:
root@server:~# mysql -u root -p pureftpd < pure-ftpd_users-table_0.0.9.sql
Enter password:

The same step can be done like that. Create the table for pure-ftpd users:

root@server:~# mysql -u root -p
Enter password:

mysql> USE pureftpd;

mysql> CREATE TABLE `ftpd` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `User` varchar(16) NOT NULL DEFAULT '',
  `status` enum('0','1') NOT NULL DEFAULT '0',
  `Password` varchar(64) NOT NULL DEFAULT '',
  `Uid` varchar(11) NOT NULL DEFAULT '2001',
  `Gid` varchar(11) NOT NULL DEFAULT '2001',
  `Dir` varchar(128) NOT NULL DEFAULT '/media/FTP',
  `ULBandwidth` int(5) NOT NULL DEFAULT '0',
  `DLBandwidth` int(5) NOT NULL DEFAULT '0',
  `comment` tinytext NOT NULL,
  `ipaccess` varchar(15) NOT NULL DEFAULT '*',
  `QuotaSize` int(6) NOT NULL DEFAULT '0',
  `QuotaFiles` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`User`),
  KEY `id` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

Create the table for pure-ftpd-webui users:

mysql> CREATE TABLE `userlist` (
  `id` int(3) NOT NULL AUTO_INCREMENT,
  `user` varchar(50) COLLATE utf8_bin NOT NULL,
  `pass` varchar(50) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

Creating administraive user

Create administraive user of pure-ftpd-webui:

mysql> INSERT INTO userlist (user,pass) VALUES ('admin',md5('adminpass'));

Configuration file

Create apache configuration file for pure-ftpd-webui Ubuntu:

root@server:~# echo "Alias /pure-ftpd-webui /var/www/pure-ftpd-webui

<Directory /var/www/pure-ftpd-webui>
    Options +FollowSymLinks
    AllowOverride None
    order allow,deny
    allow from all

    AddType application/x-httpd-php .php

    <IfModule mod_php5.c>
        php_flag magic_quotes_gpc On
        php_flag short_open_tag On
        php_flag register_globals On
        php_flag register_argc_argv On
        php_flag track_vars On
        # this setting is necessary for some locales
        php_value mbstring.func_overload 0
        php_value include_path .
    </IfModule>

    DirectoryIndex index.php
</Directory>" > /etc/apache2/conf.d/pure-ftpd-webui.conf

CentOS:

root@server:~# echo "Alias /pure-ftpd-webui /var/www/html/pure-ftpd-webui

<Directory /var/www/html/pure-ftpd-webui>
    Options +FollowSymLinks
    AllowOverride None
    order allow,deny
    allow from all

    AddType application/x-httpd-php .php

    <IfModule mod_php5.c>
        php_flag magic_quotes_gpc On
        php_flag short_open_tag On
        php_flag register_globals On
        php_flag register_argc_argv On
        php_flag track_vars On
        # this setting is necessary for some locales
        php_value mbstring.func_overload 0
        php_value include_path .
    </IfModule>

    DirectoryIndex index.php
</Directory>" > /etc/httpd/conf.d/pure-ftpd-webui.conf

Finish installation

Restart apache server:

root@server:~# apachectl restart

or Ubuntu:

root@server:~# /etc/init.d/apache2 restart

CentOS:

root@server:~# /etc/init.d/httpd restart

Open http://your_server/pure-ftpd-webui in your browser and enter administrative user's login and password.

beta 0.1.0 and later versions

Download and unpack the Pure-FTPd WebUI archive to your webserver's root folder. Or you can use git:

root@server:~# cd /var/www
root@server:/var/www# git clone git://github.com/mazay/pure-ftpd-webui.git

Make sure the Pure-FTPd WebUI directory is writable by webserver's user:

root@server:/var/www# chown www-data:www-data -R /var/www/pure-ftpd-webui

Run installation by opening: http://server_ip/pure-ftpd-webui/install.php in your web browser.

Last modified 4 years ago Last modified on Jun 15, 2013 11:57:16 AM