proftpd+mysql用户认证+quota磁盘限额
整理编辑:mars (mars_diy@21cn.com)
网上关于proftpd的安装文章实在是不少,我只是稍微整理了一下,并且使用了新的 quota磁盘限额模块
由于proftpd最新版1.2.8目前还是RC版,加上有些设置不能通用, 所以在这里还是使用1.2.7版
首先下载源码
proftpd1.2.7:
ftp://ftp.proftpd.org/distrib/sourc...d-1.2.7.tar.bz2
mod_quotatab-1.2.4 (1.2.5 版本的mod_quotatab是用在最新的1.2.8rc1上的)
http://www.castaglia.org/proftpd/mo...ab-1.2.4.tar.gz
假定你的机器上已经安装好了mysql
开始编译安装
将proftpd的源码包解压缩到某临时目录下:
localhost proftpd # tar -jxvf proftpd-1.2.7.tar.bz2
解压缩 mod_quotatab-1.2.4
localhost proftpd # tar -zxvf proftpd-mod-quotatab-1.2.4.tar.gz
进入 mod_quotatab 目录
localhost proftpd # cd mod_quotatab
把mod_quotatab中的文件拷贝到 proftpd 中的modules 目录中
localhost mod_quotatab # cp * ../proftpd-1.2.7/modules
在开始运行configure之前,我们要先改动一个文件
进入 proftpd-1.2.7/contrib 目录
localhost mod_quotatab # cd ../proftpd-1.2.7/contrib
修改 mod_sql_mysql.c
localhost contrib # vi mod_sql_mysql.c
找到#include <mysql/mysql.h> 把他该为你实际路径
如果你的mysql 安装在 /usr/local/mysql 下,就把它修改为#include </usr/local/mysql/include/mysql/mysql.h>r
然后
localhost contrib # cd ..
localhost proftpd-1.2.7 # cd ..
localhost proftpd #./configure --prefix=DIR --with-modules=mod_sql:mod_sql_mysql:mod_quotatab:mod_quotatab_sql --with-includes=DIR --with-libraries=DIR
需要修改的三个地方
--prefix=DIR 你要安装到哪里
--with-includes=DIR mysql 的includes 目录
--with-libraries=DIR mysql 的lib 目录
然后
make
make install 完成安装
接下来,进入你安装好的proftpd目录 ,修改etc/proftpd.conf 文件开始配置
基本配置我就不多说了,网上这类文章有很多,实在不会的话,自己找找就是了,这里主要介绍如何配置mysql用户认证和磁盘限额
mysql 用户认证部分:
在proftpd.conf中加入以下内容
#设置MySQL认证:
#数据库联接的信息,DatabaseName是数据库名, HostName是主机名,
#Port是端口号,UserName是连接数据库的用户名,Password是密码。
SQLConnectInfo DatabaseName@HostName:port UserName Password
#数据库认证的类型:
SQLAuthTypes Backend Plaintext
#指定用来做用户认证的表的有关信息。("FTPUSERS"和"FTPGRPS"是数据表名字,等一会而在下面建立)
SQLUserInfo FTPUSERS userid passwd uid gid homedir shell
SQLGroupInfo FTPGRPS groupname gid members
#设置如果shell为空时允许用户登录:
RequireValidShell off
#数据库的鉴别
SQLAuthenticate users groups usersetfast groupsetfast
#如果home目录不存在,则系统会为根据它的home项新建一个目录:
SQLHomedirOnDemand on
然后在这个数据库中建立一个用户表FTPUSERS,这个表是必须的:
use FTP;
create table FTPUSERS (
userid TEXT NOT NULL,
passwd TEXT NOT NULL,
uid INT NOT NULL,
gid INT NOT NULL,
home TEXT,
shell TEXT
);
此表格是为了用户认证所需要的,其中userid、passwd是必不可少的,userid是用做FTP服务的用户名;passwd是指此用户的密码;uid是系统用户的ID,也就是所映射的系统用户;gid是所属系统组的ID;home是该用户所在的HOME目录;shell可以为该用户指定相应的shell。当然你可以建立更多的字段,例如:用来记录用户登录次数的count,或者是日期的date,如果你对配置熟悉了之后,你可以根据自己的喜欢添加更多的功能。在此就不多讲。
3、如果你想需要所有的功能,你还可以添加另外一个需要的表:FTPGRPS,也就是确定组的表格,当然也可以不用,这里讲一个它的格式:
create table FTPGRPS (
grpname TEXT NOT NULL,
gid SMALLINT NOT NULL,
members TEXT NOT NULL,
);
其中grpname是组的名称,gid是系统组的ID,members是组的成员。注意:多成员,他们之间要用逗号隔开,不能使用空格。
4、为空表格插入记录:
INSERT INTO FTPUSERS (userid, passwd, uid, gid, home, shell)
valueS ('user1', '999999', '1000', '1000', '/home/FTP/user1', '' );
按此格式你可以插入这每一个用户添加一个记录。
如果你要想应用到更多的功能,且建立了组的表格,你也要为此添加记录,不过一定要注意在members的字段多个成员一定要用逗号隔开。
INSERT INTO FTPGRPS VALUES ('FTPGRPS', 1000, 'FTPUSR');
四、为FTP用户建立相应的系统用户。
在本例中,只整个FTP服务只提供一个有效的系统用户FTPUSR和组FTPGRP,当然你也可以设置多个系统用户。但出于安全的考虑,我只设一个,用他来启动FTP daemon,并把所有的FTP用户映射过这个用户。
先建立FTPGRP组:
groupadd -g 1000 -r FTPGRP
建立FTPUSR用户:
adduser -u 1000 -g 1000 -d /home/FTP -s /bin/bash -r FTPUSR
为FTPUSR建立HOME,把所有的FTP user 活动空间全放在此目录下:
mkdir /home/FTP
chown FTPUSR /home/FTP
chgrp FTPGRP /home/FTP
到这里MYSQL认证部分就算基本配置好了,接下来是磁盘限额部分
首先,还是编辑proftpd文件
#磁盘限额部分
QuotaDirectoryTally on
#磁盘限额单位 b"|"Kb"|"Mb"|"Gb"
QuotaDisplayUnits "Kb"
QuotaEngine on
#磁盘限额日志记录
QuotaLog "你的LOG路径"
# 打开磁盘限额信息,当登陆FTP帐户后,使用命令 "quote SITE QUOTA" 后可显示当前用户的磁盘限额
QuotaShowQuotas on
#以下是SQL调用语句,不用修改直接拷贝过去
SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session, limit_type, bytes_in_avail, \
bytes_out_avail, bytes_xfer_avail, files_in_avail, files_out_avail, files_xfer_avail FROM quotalimits \
WHERE name = '%{0}' AND quota_type = '%{1}'"
SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, bytes_out_used, \
bytes_xfer_used, files_in_used, files_out_used, files_xfer_used FROM quotatallies \
WHERE name = '%{0}' AND quota_type = '%{1}'"
SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, \
bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, \
files_in_used = files_in_used + %{3}, files_out_used = files_out_used + %{4}, \
files_xfer_used = files_xfer_used + %{5} \
WHERE name = '%{6}' AND quota_type = '%{7}'" quotatallies
SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" quotatallies
QuotaLimitTable sql:/get-quota-limit
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
然后建立mysql 数据表
CREATE TABLE quotalimits (
name VARCHAR(30),
quota_type ENUM("user", "group", "class", "all") NOT NULL,
per_session ENUM("false", "true") NOT NULL,
limit_type ENUM("soft", "hard") NOT NULL,
bytes_in_avail FLOAT NOT NULL,
bytes_out_avail FLOAT NOT NULL,
bytes_xfer_avail FLOAT NOT NULL,
files_in_avail INT UNSIGNED NOT NULL,
files_out_avail INT UNSIGNED NOT NULL,
files_xfer_avail INT UNSIGNED NOT NULL
);
CREATE TABLE quotatallies (
name VARCHAR(30) NOT NULL,
quota_type ENUM("user", "group", "class", "all") NOT NULL,
bytes_in_used FLOAT NOT NULL,
bytes_out_used FLOAT NOT NULL,
bytes_xfer_used FLOAT NOT NULL,
files_in_used INT UNSIGNED NOT NULL,
files_out_used INT UNSIGNED NOT NULL,
files_xfer_used INT UNSIGNED NOT NULL
);
说明一下,quotatallies表不需要作修改,它记录了用户当前的磁盘使用情况,由程序自动记录
要注意的是quotalimits 表中一些字段的含意
quota_type 磁盘限额的鉴别,可以设置单各用户,也可以设置一各组中的全部用户,还可以设置全部用户
bytes_in_avail 上传最大字节数,就是FTP用户空间容量 (设置个字段的时候是以byte(字节)为单位,如果要限额在10M,那就是10240000,下面也一样)
bytes_out_avail 下载最大字节数,需要注意的是,这个字段中记录的是用户总共能从服务器上下载多少数据,数据是累计的。
bytes_xfer_avail 总共可传输的文件的最大字节数(上传和下载流量)需要注意的是,这个字段中记录的是用户总共能传输文件的最大字节数,数据是累计的。
files_in_avail INT 总共能上传文件的数目
files_out_avail INT 能从服务器上下载文件的总数目
files_xfer_avail INT 总共可传输文件的数目(上传和下载)
好了,开始使用磁盘限额,我们要将上面建立的user1帐号给予10M空间,最多能上传500个文件到服务器上,文件传输流量为20M,只能传输10个文件。只要在MYSQL中
插入
INSERT INTO `quotalimits` ( `name` , `quota_type` , `per_session` , `limit_type` , `bytes_in_avail` , `bytes_out_avail` , `bytes_xfer_avail` , `files_in_avail` , `files_out_avail` , `files_xfer_avail` )
VALUES ('user1', 'user', 'false', 'soft', '10240000', '0', '2048000', '500', '0', '10');
就可以了,不需要设置的部分用0代替就可以了
现在运行proftpd,登陆到user1 ,使用quote SITE QUOTA 就会显示user1用户的磁盘使用情况
ftp> quote SITE QUOTA
200-The current quota for this session are [current/limit]:
Name: user1
Quota Type: User
Per Session: False
Limit Type: Soft
Uploaded Kb: 0.00/10000.00
Downloaded Kb: unlimited
Transferred Kb: 0.00/2000.00
Uploaded files: 0/500
Downloaded files: unlimited
Transferred files: 0/10
200 Please contact root@localhost if these entries are inaccurate
OK,安装完毕
(转)
白狐狸 回复于:2003-01-18 12:01:45 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
天啊,又是抱错,我该怎么办
Proftpd-1.2.7.tar.gz proftpd-mod-quotatab-1.2.4.tar.gz Mysql- 3.23.41 (已安装在/usr/local/mysql) 在make的时候出错,错误代码: /usr/libexec/elf/ld: cannot find -lmysqlclient *** Error code 1 Stop in /usr/local/src/proftpd-1.2.7. 在google上查找mysqlclient,也得到什么结果,郁闷啊 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
白狐狸 回复于:2003-01-18 17:35:15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
proftpd+mysql用户认证已经搞定,但就是加不上quota功能 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
wind521 回复于:2003-01-18 20:09:55 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[quote:ee9f7b41f5="白狐狸"]天啊,又是抱错,我该怎么办
Proftpd-1.2.7.tar.gz proftpd-mod-quotatab-1.2.4.tar.gz Mysql- 3.23.41 (已安装在/usr/local/mysql) 在make的时候出错,错误代码: /usr/libexec/elf/ld: cannot find -lmy..........[/quote:ee9f7b41f5] 机器有mysql的client端的程序吗? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nbpanda 回复于:2003-01-21 10:20:37 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[quote:f57028f8af="白狐狸"]proftpd+mysql用户认证已经搞定,但就是加不上quota功能[/quote:f57028f8af]
我也是 quota 功能加不上去,quote SITE QUOTA 回答如下: No quotas in effect | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nbpanda 回复于:2003-01-21 11:00:07 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
已经做好,但是这个quota 的功能没有 系统的quota 来的好,一个可以立刻阻断,比较好 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
白狐狸 回复于:2003-01-21 11:49:21 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
proftpd+mysql用户认证方式我在FreeBSD4.6上配置成功了,但用同样的方法却在4.7和5.0上却出错,错误代码为:
用/usr/local/ftp/sbin/proftpd -n 来起动ftp服务时,提示下面的 错误 /usr/local/ftp/sbin/proftpd: error while loading shared libraries: libmysqlclient.so.10: cannot open shared object file: No such file or directory | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
o叶大马猴 回复于:2003-01-21 11:53:22 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[quote:f2b8e5d83c="白狐狸"]proftpd+mysql用户认证方式我在FreeBSD4.6上配置成功了,但用同样的方法却在4.7和5.0上却出错,错误代码为:
用/usr/local/ftp/sbin/proftpd -n 来起动ftp服务时,提示下面的 错误 /usr/local/ftp/sbin/proftpd: e..........[/quote:f2b8e5d83c] 少了个文件.... 有关 mysqlclient的... | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
白狐狸 回复于:2003-01-21 11:55:06 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
配置使Proftpd支持MySQL认证:
#./configure --prefix=/usr/local/proftpd \ --with-modules=mod_sql:mod_sql_mysql \ --with-includes=/usr/local/mysql/include/mysql \ --with-libraries=/usr/local/mysql/lib/mysql # make # make install 应该不会出现找不到的情况啊,我mysql装在/usr/local/mysql,并且运行良好,怎么回事啊,在4.6上就没这个问题啊,libmysqlclient.so.10这个文件在/usr/local/mysql/lib/mysql/libmysqlclient.so.10,也是存在的呀 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
白狐狸 回复于:2003-01-22 23:02:27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
安装mysql时,将mysql库所在的目录添加进配置文件中,例如
echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf 然后执行ldconfig -v|grep libmysqlclient ,再试试! 所有问题得到解决,用起来的感觉就是爽,更重要的是你还可以在数据库添加更多的功能和记录更多的记录啊,谢谢 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
luj 回复于:2003-01-29 21:33:00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
我的QUOTA加上去不能登陆,报错421 Service not available,remote server has closed connection Login failed
不加QUOTA没事,是什么原因??可以把你们成功的proftpd.conf发给我参考一下吗,急 E-MAIL:luj@xxsb.com | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
白狐狸 回复于:2003-02-08 10:08:01 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
现在偶把偶的proftpd配置文件贴出来,希望对你有所帮助,嘿嘿
ServerName "白狐狸's FTP Server" ServerType standalone DefaultServer on # Port 21 is the standard FTP port. Port 21 # Umask 022 is a good standard umask to prevent new dirs and files # from being group and world writable. Umask 022 #limit the user in his owner directory DefaultRoot ~ #put the proftpd log files in /var/log/ftp.syslog SystemLog /var/log/ftp.syslog #TransferLog log files TransferLog /var/log/ftp.transferlog #set The maxtimes user Attempts times MaxLoginAttempts 3 #setup the Restart AllowRetrieveRestart on #setup the download and upload speed RateReadBPS 80000 RateWriteBPS 80000 #setup the disk quota QuotaDirectoryTally on #quota b"|"Kb"|"Mb"|"Gb" #setup the disk quota QuotaDirectoryTally on #quota b"|"Kb"|"Mb"|"Gb" QuotaDisplayUnits Kb QuotaEngine on QuotaLog /var/ftp/Quota.log QuotaShowQuotas on # We put our mod_sql directives in a <Global> block so they'll be # inherited by the <Anonymous> block below, and any other <VirtualHost> # blocks we may want to add. For a simple server these don't need to # be in a <Global> block but it won't hurt anything. <Global> # Specify our connection information. Both mod_sql_mysql and # mod_sql_postgres use the same format, other backends may specify a # different format for the first argument to SQLConnectInfo. By not # specifying a fourth argument, we're defaulting to 'PERSESSION' # connections -- a connection is made to the database at the start of # the session and closed at the end. This should be fine for most # situations. # SQLConnectInfo dbname@host:port username password SQLConnectInfo ftp@localhost:3306 root 12345678 # Specify our authentication schemes. Assuming we're using # mod_sql_mysql, here we're saying 'first try to authenticate using # mysql's password scheme, then try to authenticate the user's # password as plaintext'. Note that 'Plaintext' isn't a smart way to # store passwords unless you've got your database well secured. SQLAuthTypes Backend Plaintext # Specify the table and fields for user information. If you've # created the database as it specifies in 'README.mod_sql', you don't # need to have this directive at all UNLESS you've elected not to # create some fields. In this case we're telling mod_sql to look in # table 'users' for the fields 'username','password','uid', and # 'gid'. The 'homedir' and 'shell' fields are specified as 'NULL' -- # this will be explained below. # SQLUserInfo users username password uid gid NULL NULL SQLUserInfo ftpusers userid passwd uid gid home shell # Here we tell mod_sql that every user it authenticates should have # the same home directory. A much more common option would be to # specify a homedir in the database and leave this directive out. Note # that this directive is necessary in this case because we specified # the homedir field as 'NULL', above. mod_sql needs to get homedir # information from *somewhere*, otherwise it will not allow access. # SQLDefaultHomedir "/tmp" # This is not a mod_sql specific directive, but it's here because of # the way we specified 'SQLUserInfo', above. By setting this to # 'off', we're telling ProFTPD to allow users to connect even if we # have no (or bad) shell information for them. Since we specified the # shell field as 'NULL', above, we need to tell ProFTPD to allow the # users in even though their shell doesn't exist. RequireValidShell off # Here we tell mod_sql how to get out group information. By leaving # this commented out, we're telling mod_sql to go ahead and use the # defaults for the tablename and all the field names. # SQLGroupInfo groups groupname gid members # For small sites, the following directive will speed up queries at # the cost of some memory. Larger sites should read the complete # description of the 'SQLAuthenticate' directive; there are options # here that control the use of potentially expensive database # queries. NOTE: these arguments to 'SQLAuthoritative' limit the way # you can structure your group table. Check the README for more # information. SQLAuthenticate users # Finally, some example logging directives. If you have an integer # field named 'count' in your users table, these directives will # automatically update the field each time a user logs in and display # their current login count to them. # SQLNamedQuery getcount SELECT "count, userid from users where userid='%u'" # SQLNamedQuery updatecount UPDATE "count=count+1 WHERE userid='%u'" users # SQLShowInfo PASS "230" "You've logged on %{getcount} times, %u" # SQLLog PASS updatecount SQLHomedirOnDemand on #...SQL............... SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session, limit_type, bytes_in_avail, bytes_out_avail, bytes_xfer_avail, files_in_avail, files_out_avail, files_xfer_avail FROM quotalimits WHERE name = '%{0}' AND quota_type = '%{1}'" SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, bytes_out_used, bytes_xfer_used, files_in_used, files_out_used, files_xfer_used FROM quotatallies WHERE name = '%{0}' AND quota_type = '%{1}'" SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used = files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name = '%{6}' AND quota_type = '%{7}'" quotatallies SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" quotatallies QuotaLimitTable sql:/get-quota-limit QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally # close our <Global> block. </Global> # To prevent DoS attacks, set the maximum number of child processes # to 30. If you need to allow more than 30 concurrent connections # at once, simply increase this value. Note that this ONLY works # in standalone mode, in inetd mode you should use an inetd server # that allows you to limit maximum number of processes per service # (such as xinetd) MaxInstances 30 # Set the normal user and group permissions for the server. User ftpusr Group ftpgrp # Normally, we want files to be overwriteable. <Directory /*> AllowOverwrite on </Directory> # A basic anonymous configuration, no upload directories. If you # don't want to support anonymous access, simply remove this # <Anonymous ..> ... </Anonymous> block. <Anonymous ~ftp> User ftp Group ftp # We want clients to be able to login with "anonymous" as well as "ftp" UserAlias anonymous ftp # Limit the maximum number of anonymous logins MaxClients 10 # We want 'welcome.msg' displayed at login, and '.message' displayed # in each newly chdired directory. DisplayLogin welcome.msg DisplayFirstChdir .message # Limit WRITE everywhere in the anonymous chroot <Limit WRITE> DenyAll </Limit> </Anonymous> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lazylee 回复于:2003-02-10 21:12:12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
楼顶“找到#include <mysql/mysql.h> 把他该为你实际路径”可以用编译时加入 --with-mysql=/usr/local/mysql 代替
找不到 mysqlclient 可以的另一个解决办法是把 /usr/local/mysql/lib/mysql 下的东西拷到 /usr/local/lib 下 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
白狐狸 回复于:2003-02-10 21:58:15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[quote:354fcfaa76="lazylee"]楼顶“找到#include <mysql/mysql.h> 把他该为你实际路径”可以用编译时加入 --with-mysql=/usr/local/mysql 代替
找不到 mysqlclient 可以的另一个解决办法是把 /usr/local/mysql/lib/mysql 下的东西拷到 ..........[/quote:354fcfaa76] 你实际做了没??不要凭空想当然好不好,拜托!! | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lazylee 回复于:2003-02-10 23:29:05 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
我当然这么做了,你如果没试过就不要着急反驳我 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
白狐狸 回复于:2003-02-11 00:10:09 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
”找不到 mysqlclient 可以的另一个解决办法是把 /usr/local/mysql/lib/mysql 下的东西拷到 /usr/local/lib 下“
这个办法谁都能想到呀,但我在FreeBSD下试过了,通不过 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lazylee 回复于:2003-02-11 11:28:24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sorry,笔误,昨天晚上困了,我是拷到 /usr/lib 下了,正常使用中 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
haohaoo 回复于:2003-02-11 14:28:26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
good | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
luj 回复于:2003-02-17 15:35:34 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
proftpd+Mysql搞好,还是老问题
我的QUOTA加上去不能登陆,报错421 Service not available,remote server has closed connection Login failed 不加QUOTA没事,是什么原因,就教成功的人!! | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
henkon 回复于:2003-02-19 18:39:10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
groupadd –g 1000 –r FTPGRP
出现groupadd:Command not found??是什么回事?? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
白狐狸 回复于:2003-02-20 09:31:45 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[quote:0029301de5="henkon"]groupadd –g 1000 –r FTPGRP
出现groupadd:Command not found??是什么回事??[/quote:0029301de5] pw groupadd –g 1000 –r FTPGRP | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
henkon 回复于:2003-02-20 19:02:17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
出现新的问题在下面这步的时候出现 ERROR 1064:You have an error in your SQL syntax near ')' at line 12怎么办???
CREATE TABLE quotalimits ( name VARCHAR(30), quota_type ENUM("user", "group", "class", "all") NOT NULL, per_session ENUM("false", "true") NOT NULL, limit_type ENUM("soft", "hard") NOT NULL, bytes_in_avail FLOAT NOT NULL, bytes_out_avail FLOAT NOT NULL, bytes_xfer_avail FLOAT NOT NULL, files_in_avail INT UNSIGNED NOT NULL, files_out_avail INT UNSIGNED NOT NULL, files_xfer_avail INT UNSIGNED NOT NULL, ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
白狐狸 回复于:2003-02-20 19:19:53 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
照样考过去就是呀,
CREATE TABLE quotalimits ( name VARCHAR(30), quota_type ENUM("user", "group", "class", "all") NOT NULL, per_session ENUM("false", "true") NOT NULL, limit_type ENUM("soft", "hard") NOT NULL, bytes_in_avail FLOAT NOT NULL, bytes_out_avail FLOAT NOT NULL, bytes_xfer_avail FLOAT NOT NULL, files_in_avail INT UNSIGNED NOT NULL, files_out_avail INT UNSIGNED NOT NULL, files_xfer_avail INT UNSIGNED NOT NULL ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lazylee 回复于:2003-02-21 09:18:40 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
es_xfer_avail INT UNSIGNED NOT NULL,
这行最后不能有 , | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
henkon 回复于:2003-02-21 18:13:13 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[quote:b9cf9056a8="白狐狸"]照样考过去就是呀,
CREATE TABLE quotalimits ( name VARCHAR(30), quota_type EENUM("user", "group", "class", "all") NOT NULL, per_session ENUM("false", "true") NOT NULL, limit_type ENUM("soft"..........[/quote:b9cf9056a8] 是考到proftpd.conf中吗?而不是在FTP里直接建数据表吗?如果拷的话怎么拷?我是新人,请白狐狸兄指点迷津 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
白狐狸 回复于:2003-02-21 20:22:39 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[quote:b3e59e4ae4="henkon"]
是考到proftpd.conf中吗?而不是在FTP里直接建数据表吗?如果拷的话怎么拷?我是新人,请白狐狸兄指点迷津[/quote:b3e59e4ae4] 就是直接在Mysql中建立表呀,通过phpmyadmin即可 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dykeyer 回复于:2003-02-23 17:39:28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
谢谢了, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
henkon 回复于:2003-03-05 17:25:57 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
为什么我建组的数据表的时候出现错误??
create table FTPGRPS ( grpname TEXT NOT NULL, gid SMALLINT NOT NULL, members TEXT NOT NULL, );
|