[Proftpd-user] Can not get SQLLog to work
Terje With Lunndal <terje <at> lunndal.priv.no>
2006-07-02 16:44:36 GMT
Greetings,
I am implementing a SQL backend on my FTP server. This is working just
fine except for the SQLLog and SQLUserInfo directives. They simply seem
to be ignored by ProFTPd. There are no relevant error messages as far as
I can see in the SQLLogFile or the console output from the "-d 10"
command line.
I am running ProFTPd/1.3.0 with mod_sql/4.2.1 and mod_sql_mysql/4.05 on
FreeBSD 6.1-STABLE with MySQL 4.1.19.
I am attaching my config file in the hopes that someone will spot an
error or something I have forgotten. The VirtualHost using mod_sql is at
the end of the file.
My MySQL tables look like this:
mysql> describe users;
+------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+---------------------+------+-----+---------+-------+
| userid | varchar(30) | | PRI | | |
| passwd | varchar(80) | | | | |
| uid | int(11) | YES | MUL | NULL | |
| gid | int(11) | YES | | NULL | |
| homedir | varchar(255) | YES | | NULL | |
| shell | varchar(255) | YES | | NULL | |
| bytes_up | bigint(20) unsigned | YES | | 0 | |
| bytes_down | bigint(20) unsigned | YES | | 0 | |
| logins | bigint(20) unsigned | YES | | 0 | |
| last_login | datetime | YES | | NULL | |
+------------+---------------------+------+-----+---------+-------+
mysql> describe groups;
+-----------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+-------+
| groupname | varchar(30) | | | | |
| gid | int(11) | | | 0 | |
| members | varchar(255) | YES | | NULL | |
+-----------+--------------+------+-----+---------+-------+
Any help is gratly appreciated!
--
Terje With Lunndal
#
# server conf
#
MaxInstances 30
User nobody
Group nogroup
ServerAdmin xxxxxxxxxxxxxxxxxx
MultilineRFC2228 on
PersistentPasswd off
Port 21
PassivePorts 49152 65534
#Port 2121
#
# global conf
#
<Global>
ExtendedLog /var/log/proftpd.log auth,write
TransferLog NONE
ServerIdent on "\"What's da passvoid?\""
IdentLookups off
Umask 022
RequireValidShell on
DefaultRoot ~ ftp
DisplayLogin .login_message
DisplayFirstChdir .message
<Directory /*>
AllowOverwrite yes
</Directory>
<Limit LOGIN>
DenyUser nalle,root
</Limit>
</Global>
ServerName "xxxxxxxxxxxxxxxxxx"
<Anonymous ~ftp>
User ftp
Group ftp
UserAlias anonymous ftp
MaxClients 5
RequireValidShell off
<Limit WRITE>
DenyAll
</Limit>
<Directory /local/home/ftp/incoming>
<Limit STOR MKD>
AllowAll
</Limit>
</Directory>
<Limit LOGIN>
Order Allow,Deny
xxxxxxxxxxxxxxx
Deny from ALL
</Limit>
DirFakeUser on foo
DirFakeGroup on bar
</Anonymous>
<VirtualHost xxx.xxx.xxx.xxx>
Port xxxx
RequireValidShell off
RootLogin off
DefaultRoot ~
AuthOrder mod_sql.c
DirFakeUser on foo
DirFakeGroup on bar
SQLEngine auth
SQLLogFile /var/log/proftpd_sql.log
SQLAuthenticate on
SQLNegativeCache on
SQLAuthTypes Plaintext
SQLDefaultUID 1012
SQLDefaultGID 1012
SQLDefaultHomedir /usr/local/tmp/ftptest
SQLConnectInfo ftp xxxxxxxxx xxxxxxxxx
SQLUserInfo users userid passwd uid gid homedir shell
SQLGroupInfo groups groupname gid members
# Special SQL-fu
SQLLog PASS updatecount
SQLNamedQuery updatecount UPDATE "logins=logins+1 WHERE userid='%u'" users
# Noone is allowed to overwrite files
AllowOverwrite no
# Nobody but members of adm can write
<Limit WRITE>
AllowGroup adm
DenyAll
</Limit>
# Everyone can upload into Incoming
<Directory /usr/local/tmp/ftptest/Incoming>
<Limit STOR MKD>
AllowAll
</Limit>
</Directory>
</VirtualHost>
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
ProFTPD Users List <proftpd-users <at> proftpd.org>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html