Hallo,
ich habe ein Login System mit MySQL aufgebaut. Man kann sich ohne Probleme einloggen und kann Dateien hoch- und runterladen.
Gerade versuche ich Quota auf MySQL Basis hinzuzufügen.
Ich bin nach dem Tutorial von
http://www.castaglia.org/proftpd/modules/mod_quotatab_sql.html vorgegangen.
Ich habe nun die Tabelle "quotalimits" und "quotatallies".
In "quotalimits" habe ich folgendes stehen:
`quotalimits` VALUES ('testman', 'all', 'true', 'soft', 1, 1, 1, 1, 1, 1);
In quotatallies:
`quotatallies` VALUES ('testman', 'all', 0, 0, 0, 0, 0, 0);
Meine Konfiguration lautet:
SQLConnectInfo serv@localhost root test123
SQLAuthenticate users
SQLAuthTypes crypt
SQLUserInfo users username pwd uid gid mountpoint shell
SQLGroupInfo groups groupname gid members
SQLLog PASS updatecount
SQLNamedQuery updatecount UPDATE "last_ftp_login=unix_timestamp() WHERE username='%u'" users
SQLLog RETR,STOR transfer1
SQLNamedQuery transfer1 INSERT "'', '%U', '%b', unix_timestamp()" traffic_ftp
QuotaEngine on
QuotaShowQuotas on
QuotaLimitTable sql:/SELECT-SQLNamedQuery
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 = 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
Ausgabe von quote SITE QUOTA:
ftp> quote SITE QUOTA
202 No quotas in effect
ftp>
Ich bin mit meinem Latein am Ende
Kann mir bitte er helfen?