pureftpd+ftp_v2.1管理程序问题
http://szakx.kmip.net/pureadmin 我网上下载的ftp_v2.1管理程序
http://szakx.kmip.net/ftpadmin 现在正在使用的,也就是网上说的pureftpdadmin汉化版
请问下我如何才能使用http://szakx.kmip.net/pureadmin来管理FTP呢?用户名:admin admin
安装过程如下:
# tar zxvf pure-ftpd-1.0.20.tar.gz
# cd pure-ftpd-1.0.20
# ./configure --prefix=/usr/local/pureftpd --with-mysql=/bluemail/mysql --with-paranoidmsg --with-shadow --with-welcomemsg --with-uploadscript --with-quotas --with-cookie --with-virtualhosts --with-virtualroot --with-diraliases --with-sysquotas --with-ratios --with-ftpwho --with-throttling --with-language=simplified-chinese
#make
#make check
#make install
#mkdir -m 777 /usr/local/pureftpd/etc
#cp pureftpd-mysql.conf /usr/local/pureftpd/etc/pureftpd-mysql.conf
#cp configuration-file/pure-ftpd.conf /usr/local/pureftpd/etc/pure-ftpd.conf
#cp configuration-file/pure-config.pl /usr/local/pureftpd/bin/pure-config.pl
注意 --prefix=/usr/local/pureftpd 参数指定了pureftpd的安装路径
--with-mysql=/usr/local/mysql 参数指定了mysql的安装路径
--with-language=simplified-chinese 参数指定了服务器返回信息使用的语言
二、建立mysql认证数据库表
在mysql服务器中建立pureftpd数据库
mysql> CREATE DATABASE pureftpd;
mysql> grant all on pureftpd.* to pureftpd@localhost identified by 'pureftpd';
mysql> use pureftpd;
mysql> CREATE TABLE `users` (
`id` int(32) unsigned NOT NULL auto_increment,
`User` varchar(16) NOT NULL default '',
`Password` varchar(64) NOT NULL default '',
`Uid` varchar(11) NOT NULL default '-1',
`Gid` varchar(11) NOT NULL default '-1',
`Dir` varchar(128) NOT NULL default '',
`QuotaSize` smallint(5) NOT NULL default '0',
`QuotaFiles` int(11) NOT NULL default '0',
`ULBandwidth` smallint(5) NOT NULL default '0',
`DLBandwidth` smallint(5) NOT NULL default '0',
`ULRatio` smallint(6) NOT NULL default '0',
`DLRatio` smallint(6) NOT NULL default '0',
`comment` tinytext NOT NULL,
`ipaccess` varchar(15) NOT NULL default '*',
`status` enum('0','1') NOT NULL default '0',
`create_date` datetime NOT NULL default '0000-00-00 00:00:00',
`modify_date` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`,`User`),
UNIQUE KEY `User` (`User`)
) TYPE=MyISAM AUTO_INCREMENT=5 ;
三、建立用于pureftpd认证用户的系统信息
建立用于pureftpd认证用户的登陆目录
# mkdir /ftproot
建立用于pureftpd认证用户的系统组和系统用户
# groupadd pureftpusers -g 2000
# useradd pureftpusers -u 2000 -g pureftpusers -d /ftproot -s /sbin/nologin
分配目录权限
# chown pureftpusers /ftproot
# chgrp pureftpusers /ftproot
设置目录只读
# chmod 500 /ftproot
# chmod 700 /ftproot
四、修改pureftpd的配置文件
修改配置文件
vi /usr/local/pureftpd/etc/pure-ftpd.conf
代码:
MaxClientsNumber 100
MaxClientsPerIP 3
MaxIdleTime 5
MySQLConfigFile /usr/local/pureftpd/etc/pureftpd-mysql.conf
# Disallow downloading of files owned by "ftp", ie.
# files that were uploaded but not validated by a local admin.
AntiWarez no
Bind *,2121
# Maximum bandwidth for anonymous users in KB/s
AnonymousBandwidth 800
# Allow FXP transfers for authenticated users.
AllowUserFXP yes
NoChmod yes
IPV4Only yes
DisplayDotFiles no
代码:
vi /usr/local/pureftpd/etc/pureftpd-mysql.conf
代码:
MYSQLUser pureftpd
MYSQLPassword pureftpd
#密码在数据表中的存储方式,这里选择加密
MYSQLCrypt crypt
MYSQLSocket /temp/mysql.sock
五、运行pureftpd
在mysql数据表中先加入一个测试用户test,密码也是test
代码:
INSERT INTO `users` VALUES (1, 'test', encrypt('test'), '2000', '2000', '/ftproot', 0, 0, 0, 0, 0, 0, '', '*', '1', '2005-04-04 09:20:33', '2005-04-04 09:20:33');
运行pureftpd服务器
代码:
/usr/local/pureftpd/bin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf