Ich habe endlich meine Proftpd zu laufen gebracht, nach dem ich unzählige Stunden in diesem Forum nach helfeden Treats durchsucht habe.
Jetzt scheint er zu laufen, mit sql und quotatab, doch irgend wie habe ich das ganze noch nicht ganz kapiert wie das aus zu sehen hat, dass heisst.
Ich habe die Konfigurations Datei von dir Stonki genommen, doch habe ich nirgens eine DB-Strucktur gefunde. Wäre es möglich wenn du die noch darzustellen?
Danke im voraus
Gepi
mysql> use proftpd;
Database changed
mysql> show tables;
+-------------------+
| Tables_in_proftpd |
+-------------------+
| groups |
| quotalimits |
| quotatallies |
| users |
| xfer_stat |
+-------------------+
5 rows in set (0.01 sec)
mysql> show fields from groups; show fields from quotalimits; show fields from quotatallies; show fields from users; show fields from xfer_stat;
+-----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+----------------+
| groupname | varchar(60) | | UNI | | |
| gid | int(11) | | UNI | 0 | |
| members | varchar(255) | | | | |
| ui | bigint(20) | | PRI | NULL | auto_increment |
+-----------+--------------+------+-----+---------+----------------+
4 rows in set (0.00 sec)
+------------------+------------------------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+------------------------------------+------+-----+---------+-------+
| name | varchar(30) | YES | | NULL | |
| quota_type | enum('user','group','class','all') | | | user | |
| per_session | enum('false','true') | | | false | |
| limit_type | enum('soft','hard') | | | soft | |
| bytes_in_avail | float | | | 0 | |
| bytes_out_avail | float | | | 0 | |
| bytes_xfer_avail | float | | | 0 | |
| files_in_avail | int(10) unsigned | | | 0 | |
| files_out_avail | int(10) unsigned | | | 0 | |
| files_xfer_avail | int(10) unsigned | | | 0 | |
+------------------+------------------------------------+------+-----+---------+-------+
10 rows in set (0.00 sec)
+-----------------+------------------------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+------------------------------------+------+-----+---------+-------+
| name | varchar(30) | | | | |
| quota_type | enum('user','group','class','all') | | | user | |
| bytes_in_used | float | | | 0 | |
| bytes_out_used | float | | | 0 | |
| bytes_xfer_used | float | | | 0 | |
| files_in_used | int(10) unsigned | | | 0 | |
| files_out_used | int(10) unsigned | | | 0 | |
| files_xfer_used | int(10) unsigned | | | 0 | |
+-----------------+------------------------------------+------+-----+---------+-------+
8 rows in set (0.00 sec)
+-----------------+--------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+---------------------+----------------+
| username | varchar(60) | | UNI | | |
| uid | int(11) | | | 0 | |
| gid | int(11) | | | 0 | |
| password | varchar(30) | | | | |
| homedir | varchar(255) | | | | |
| count | int(11) | | | 0 | |
| ul_bytes | bigint(20) | | | 0 | |
| dl_bytes | bigint(20) | | | 0 | |
| ul_count | bigint(20) | | | 0 | |
| dl_count | bigint(20) | | | 0 | |
| ui | bigint(20) | | PRI | NULL | auto_increment |
| shell | varchar(60) | | | /bin/false | |
| letzter_zugriff | datetime | | | 0000-00-00 00:00:00 | |
| zugang | char(1) | | | | |
+-----------------+--------------+------+-----+---------------------+----------------+
14 rows in set (0.00 sec)
+------------+------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+------------+------+-----+---------------------+----------------+
| username | tinytext | | MUL | | |
| filename | text | | MUL | | |
| size | bigint(20) | | | 0 | |
| host | tinytext | | | | |
| ip | tinytext | | | | |
| aktion | tinytext | | MUL | | |
| dauer | tinytext | | | | |
| zeit_lokal | datetime | | | 0000-00-00 00:00:00 | |
| success | char(1) | | | | |
| ui | bigint(20) | | PRI | NULL | auto_increment |
+------------+------------+------+-----+---------------------+----------------+
10 rows in set (0.00 sec)
mysql>
Meine ProFTPD.conf sieht zur Zeit so aus:
#------------------------mysql Modul: 4.x
#
# Zugangskontrolle
#
SQLAuthTypes Plaintext
SQLAuthenticate users*
SQLConnectInfo DB@localhost USER PASS
SQLDefaultGID 65534
SQLDefaultUID 65534
SQLMinUserGID 100
SQLMinUserUID 500
SQLUserInfo users username password uid gid homedir shell
#
# aktive SQL Kommandos, ab hier passiert etwas :-)
#
SQLLog PASS counter
SQLNamedQuery counter UPDATE "letzter_zugriff=now(), count=count+1 WHERE username='%u'" users
# xfer Log in mysql
SQLLog RETR,STOR transfer1
SQLNamedQuery transfer1 INSERT "'%u', '%f', '%b', '%h', '%a', '%m', '%T',now(), 'c', NULL" xfer_stat
SQLLOG ERR_RETR,ERR_STOR transfer2
SQLNamedQuery transfer2 INSERT "'%u', '%f', '%b', '%h', '%a', '%m', '%T',now(), 'i', NULL" xfer_stat
#
# mod_quota tab
#
#QuotaEngine on
#QuotaShowQuotas on
#QuotaLimitTable sql:/get-quota-limit
#QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally
#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 = byt
es_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
cu
stonki