Table of Contents
Install Ispconfig 3 Proftpd for Debian: Install Proftpd covers the essential facts behind the topic, including what changed, why it mattered, and how it affected users.
Prepare to Install
ProFTPd is a powerful and simple FTP server for installation and configuration, used by many servers. However, this tutorial does not include quota because it is not supported in VPS (if you do not want to edit ftp_user_edit.php in ISPConfig 3).
In this illustration we use Debian 5.0 Lenny but it can also be applied to version 6.0. Some other distributions may need some modification.
Note: this process works fine on a clean server and installs ISPConfig 3. If using the current server will need to enter and editting / saving every user created, which may cause some problems.
Setting
First, run the following command independently:
apt-get remove pure-ftpd-common pure-ftpd-mysql apt-get install proftpd proftpd-mod-mysql
Create Group & User
groupadd -g 2001 ftpgroup useradd -u 2001 -s / bin / false -d / bin / null -c "proftpd user" -g ftpgroup ftpuser
Configure the Database
Run the following command:
mysql -u root -p Use dbispconfig
Then run the following query:
ALTER TABLE `ftp_user` ADD` shell` VARCHAR (18) NOT NULL DEFAULT '/ sbin / nologin', ADD `count` INT (11) NOT NULL DEFAULT '0', ADD `access` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', ADD `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'; CREATE TABLE ftp_group ( groupname varchar (16) NOT NULL default '', gid smallint (6) NOT NULL default '5500', members varchar (16) NOT NULL default '', KEY groupname (groupname) ) TYPE = MyISAM COMMENT = 'ProFTP group table'; INSERT INTO `ftp_group` (` groupname`, `gid`,` members`) VALUES ('ftpgroup', 2001, 'ftpuser');
Configure Proftpd
We will first modify the /usr/local/ispconfig/interface/lib/config. Inc. Php file:
nano /usr/local/ispconfig/interface/lib/config.inc.php
Find the variable db_password and password note for later.
Edit the file /etc/proftpd/proftpd. Conf:
nano /etc/proftpd/proftpd.conf
Find to LINE:
#Include /etc/proftpd/sql.conf
Remove the caption for it to become:
Include /etc/proftpd/sql.conf
Edit the file /etc/proftpd/sql. Conf:
nano /etc/proftpd/sql.conf
Delete all content in it and replace it with:
# # Proftpd sample configuration for SQL-based authentication. # # (This không phải được sử dụng nếu bạn muốn xác thực PAM-based) # DefaultRoot ~ SQLBackend mysql # The passwords printed MySQL are encrypted using CRYPT SQLAuthTypes Plaintext Crypt SQLAuthenticate users # used to connect to the database # databasename users group database_user user_password SQLConnectInfo dbispconfig @ localhost ispconfig _insertpasswordhere_ # Here we tell ProFTPd the names of the database columns in the "usertable" # we want it to interact with. Đã có các tên với các người dùng trong cơ sở dữ liệu dbUser trong sqp_user username password uid gid dir shell # Here we tell ProFTPd the names of the database columns in the "grouptable" # we want it to interact with. Again các tên với các cùng trong cơ sở dữ liệu SQLGroupInfo ftp_group groupname gid members # set min UID and GID - otherwise these are 999 each SQLMinID 500 # create a directory user on demand if it doesn't exist CreateHome off # Update count every time logs in SQLLog PASS updatecount SQLNamedQuery updatecount UPDATE "count = count + 1, accessed = now () WHERE userid = '% u'" ftpuser # Update modified everytime user uploads or deletes a file SQLLog STOR, DELE modified SQLNamedQuery modified UPDATE, DELE modified SQLNamedQuery modified UPDATE "modified = now () WHERE userid = '% u' "ftpuser RootLogin off RequireValidShell off
Make sure you have changed _insertpasswordhere_ with a password from ISPConfig.
If the MySQL database is on another server, change localhost to represent your MySQL server.
Edit the file /etc/proftpd/modules. Conf:
nano /etc/proftpd/modules.conf
Find to LINE:
#LoadModule mod_sql.c
And uncomment it to:
LoadModule mod_sql.c
Change the LINE:
#LoadModule mod_sql_mysql.c
City:
LoadModule mod_sql_mysql.c
Finally run:
/etc/init.d/proftpd restart
Change Ispconfig 3
Now we need to change some files in ispconfig. Although this is not the best idea because when upgrading to the new version, these changes will disappear. However, in this case, ProFTPD will work better.
Edit the file /usr/local/ispconfig/interface/web/sites/ftp_user_edit. Php:
nano /usr/local/ispconfig/interface/web/sites/ftp_user_edit.php
Find the LINE:
$ uid = $ web ["system_user"]; $ gid = $ web ["system_group"];
And replace with:
$ userinfo = posix_getpwnam ($ web ["system_user"]); $ uid = $ userinfo ['uid']; $ gid = $ userinfo ['gid'];
It is done! Note that if you are logged into the ISPConfig web console, you must log out before changing the registrations on your computer.
FAQ
What is the main topic of Install Ispconfig 3 Proftpd for Debian: Install Proftpd?
Install Ispconfig 3 Proftpd for Debian: Install Proftpd covers the essential facts behind the topic, including what changed, why it mattered, and how it affected users.
Why is Install ProFTPd important?
Prepare to Install ProFTPd is a powerful and simple FTP server for installation and configuration, used by many servers.
What should readers remember about Install ProFTPd?
However, this tutorial does not include quota because it is not supported in VPS (if you do not want to edit ftp_user_edit. Php in ISPConfig 3).
Reader Comments 0
Sign in with email or Google to join the discussion.