Most of the time, for the sake of security, you do not want to create users in the Ubuntu system to use ftp. At this time, you can consider using proftpd and mysql to implement and using mysql to manage users. Based on the instructions in this article, you can quickly establish an ftp + mysql Server 1. Environment: Ubuntu10.04.164bitproftpd1.3.2mysql5.1.412. Install proftpdUbuntu on
Most of the time, for the sake of security, you do not want to create users in the Ubuntu system to use ftp. At this time, you can consider using proftpd and mysql to implement and using mysql to manage users.
Based on the instructions in this article, you can quickly create an ftp + mysql Server
1. Environment:
Ubuntu 10.04.1 64bit
Proftpd 1.3.2
Mysql 5.1.41
2. Install proftpd
On Ubuntu
Apt-get install proftpd-basic proftpd-mod-mysql-server
3. Modify the proftpd. conf configuration file.
To:
ServerIdent on "Serv-u ftp" ServerName "ftp.gaojinbo.com" DefaultRoot ~
4. Add a file
RootLogin off kernel off LoadModule kernel AuthOrder extends SQLBackend mysql kernel Backend servers users * groups * SQLConnectInfo ftpuser @ localhost root login SQLUserInfo login userid passwd uid gid homedir shell SQLGroupInfo login groupname gid members SQLLog PASS updatecount SQLNamedQuery updatecount UPDATE "countcount = count + 1, accessed = now () WHERE userid = '% U' "ftp_users SQLLog STOR, DELE modified SQLNamedQuery modified UPDATE" modified = now () WHERE userid =' % U' "ftp_users
5. Add User www
Useradd www
Add the ftp File Permission for www users. The uid and gid are 1001
6. Create a database
Mysql-uroot-pgaojinbo create database ftpuser default character set = UTF-8; use ftpuser create table ftp_users (userid varchar (30), passwd varchar (50), uid int (10 ), gid int (10), homedir varchar (50), shell varchar (50); insert into ftp_users values ('gaojinbo', password ('gaojinbo'), '123 ′, '000000', '/var/ftp/virtual/gaojinbo.com', '/bin/nologin'); create table ftp_groups (groupname varchar (50), gid int (10 ), members varchar (250); insert into ftp_groups values ('ftpgroup', '1', 'gaojinbo ');
Create user main directory
Mkdir-p/var/ftp/virtual/gaojinbo.com
7. Start proftpd and Test
/Etc/init. d/proftpd start
Or
Proftpd-nd6
Ftp localhost
User gaojinbo, password gaojinbo
In this way, ProFTPd and MySQL are installed in Ubuntu!