www.ProFTPD.de

ProFTPD => ProFTPD - Deutsch => Thema gestartet von: Altec am 19. September 2004, 21:58:59



Titel: Quota + mysql Problem
Beitrag von: Altec am 19. September 2004, 21:58:59
Hallo,

ich habe heute versucht mod_quota auf meine Art zu installieren. Habe dazu auch die Anleitung hier verwendet. Problem ist nur, dass es noch nicht funktioniert. Es ist alles reincompiliert und ich sehe auch keinen Fehler im Log (proftpd -d 9 -n).
Ich habe bereits eine bestehende Tabelle. Da greifen noch andere drauf zu und für die Verwaltung wärs leichter, wenn die bleiben könnte.

Also folgend sieht meine proftpd.conf aus:

Zitat

SQLNamedQuery get-quota-limit SELECT "username, 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 my_users WHERE username = '%{0}' AND quota_type = '%{1}'"

SQLNamedQuery get-quota-tally SELECT "username, quota_type, bytes_in_used, bytes_out_used, bytes_xfer_used, files_in_used, files_out_used, files_xfer_used FROM my_users WHERE username = '%{0}' AND quota_type = '%{1}'"


Ausschnitt aus den Log Files:

Zitat
debian (ip) - dispatching PRE_CMD command 'SITE QUOTA' to mod_core
debian (ip) - dispatching PRE_CMD command 'SITE QUOTA' to mod_core
debian (ip)  - dispatching PRE_CMD command 'SITE QUOTA' to mod_site
debian (ip) - dispatching CMD command 'SITE QUOTA' to mod_quotatab
debian (ip) - in dir_check_full(): path = '/', fullpath = '/nfs/www/eeeee/'.
debian (ip) - FS: using system stat()
debian (ip) - FS: using system stat()
debian (ip) - dispatching POST_CMD command 'SITE QUOTA' to mod_sql
debian (ip) - dispatching POST_CMD command 'SITE QUOTA' to mod_site
debian (ip) - dispatching LOG_CMD command 'SITE QUOTA' to mod_sql
debian (ip) - dispatching LOG_CMD command 'SITE QUOTA' to mod_log


Folgende Tabellen habe ich angelegt:

Zitat

quota_type -> User
per_session -> True
limit_type -> Hard
bytes_in_avail -> 111
bytes_out_avail -> 111
bytes_xfer_avail -> 111
files_in_avail -> 111
files_out_avail -> 111
files_xfer_avail -> 111


Ausgabe von "quote SITE QUOTA" bring folgendes:

Zitat

ftp> quote SITE QUOTA
202 No quotas in effect



Weiß wer was ich falsch mache? Wäre nett, wenn mir wer helfen könnte :)


Titel: Re: Quota + mysql Problem
Beitrag von: stonki am 20. September 2004, 16:20:50
Deine Config ist IMHO nicht komplett. Poste die mal komplett


Titel: Quota + mysql Problem
Beitrag von: Altec am 21. September 2004, 22:11:13
Zitat
ServerName                      "FTP Server"
ServerAdmin                     ftp@pageone.de
ServerType                      standalone
DeferWelcome                    off
RequireValidShell               off
ShowSymlinks                    on
MultilineRFC2228                on
DefaultServer                   on
ShowSymlinks                    on
AllowOverwrite                  on
AllowStoreRestart               on
TimeoutNoTransfer               600
TimeoutStalled                  600
TimeoutIdle                     1200
#LsDefaultOptions                "-l"
DenyFilter                      \*.*/
Port                            21
MaxInstances                    1000
User                            proftpdu
Group                           proftpdg
UseReverseDNS                   off
IdentLookups                    off
DefaultRoot                     ~       !users
MaxLoginAttempts                3

SQLConnectInfo                  ftp@pageone.de ftp 8d8sj
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'" cv2_users
SQLLog                          RETR,STOR transfer1
SQLNamedQuery                   transfer1 INSERT "'', '%U', '%b'" cv2_traffic_ftp

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 "username, 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 my_users WHERE username = '%{0}' AND quota_type = '%{1}'"

SQLNamedQuery get-quota-tally SELECT "username, quota_type, bytes_in_used, bytes_out_used, bytes_xfer_used, files_in_used, files_out_used, files_xfer_used FROM my_users WHERE username = '%{0}' AND quota_type = '%{1}'"


Hallo,

hier bitte, danke für die Hilfe :)


Titel: Quota + mysql Problem
Beitrag von: Altec am 24. September 2004, 23:07:00
Keiner weiß eine Lösung?  :cry:


Titel: Quota + mysql Problem
Beitrag von: stonki am 27. September 2004, 08:33:02
Dir fehlt IMHO die Tabelle für den einzelnen Usernamen.
http://www.castaglia.org/proftpd/modules/mod_quotatab_sql.html

One SQLNamedQuery is needed to SELECT quota information from the limit table. The defined SQL statement for this must return ten values, in the following order:
[...]


A similar SQLNamedQuery is needed to SELECT quota information from the tally table; the SQL statement defined for this must return eight values, in the following order:

!!!!