skip to content
<< Proftp Server konfiguieren - Teil 1 Übersicht Datenbank befüllen >>
Proftp Server konfiguieren - Teil 2 Proftpd Anbindung an die Mysql Datenbank

7. Proftpd Anbindung an die Mysql Datenbank

 

Vim /etc/proftpd/mysql.conf:

# Force the use of mysql backend

SQLBackend mysql

 

# The passwords in MySQL are using its own PASSWORD function

SQLAuthTypes Backend Crypt

SQLAuthenticate users* groups*

 

# details to connect to mysql db

# dbname@host dbuser dbpass

SQLConnectInfo ftp@localhost proftpd porto.

 

# Let proFTPd know the name of the columns in the user table

# Mind that this need to match the name in you table

SQLUserInfo ftpuser userid passwd uid gid homedir shell

 

# Let proFTPd know the name of the columns in the group table

# we want it to interact with. Again the names match with those in the db

SQLGroupInfo ftpgroup groupname gid members

 

# set Default UID and GID

SQLDefaultGID 65534

SQLDefaultUID 65534

# set min UID and GID - otherwise these are 999 each SQLMinID 500

SQLMinUserGID 2001

SQLMinUserUID 2001

 

# proftpd will dynamicaly create if the homedir does not yet exist

SQLHomedirOnDemand on

 

# update counter when a user logs in

SQLLog PASS updatecount

SQLNamedQuery updatecount UPDATE "count=count+1, accessed=now() WHERE userid='%u'" ftpuser

 

# change modified time anytime a user delete a file or upload one

SQLLog STOR,DELE modified

SQLNamedQuery modified UPDATE "modified=now() WHERE userid='%u'" ftpuser

 

#SQL Logfile

SQLLOGFILE /var/log/proftpd/proftpd.sql.log



Zuletzt geändert von Administrator (admin)  am Jan 28 2009  um 22:34
<< Proftp Server konfiguieren - Teil 1 Übersicht Datenbank befüllen >>