proftpd mod_ratio not working correctly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
proftpd-dfsg (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: proftpd-mod-mysql
Hello,
I think I found a bug in mod_ratio of proftpd.
When a user logs onto the system, his actions (number of files/mb for upload/download) are updated correctly in the specified ratio files. But when the user logs out and connects again, the mbs are set to zero and the credits are calculated only from the "UserRatio"-value in config. Strange to me is the fact that the filenumber count get's read correctly from the ratiofile. For example:
Content of Ratiofiles:
root@server:
test|7|
root@server:
test|7|
During FTP Logon:
[R] 331 Password required for test
[R] PASS (hidden)
[R] 230-User test logged in
[R] 230 Down: 1 Files (0mb) Up: 7 Files (0mb) 1:5B CR: 2300
2300MB Credit is only what I have granted a new user as initial "welcome gift". ProFTPD simply does not take the uploaded 102404 kb into account. With the specied 1:5 ratio, the user should now have 2750 mb credits. (initial 2300 mb + 5x 100 mb uploaded so far - 1x 50mb downloaded so far)
Here is an extract of the important blocks of the config:
root@server:
[...]
<IfModule mod_ratio.c>
Ratios on
SaveRatios on
RatioFile "/ratio/ratios"
RatioTempFile "/ratio/tmpratios"
LeechRatioMsg "Access: Unlimited"
ByteRatioErrMsg "You are out of credits! Upload more stuff!"
UserRatio ftpadm 0 0 0 0
UserRatio * 0 0 5 2355200
</IfModule>
[...]
<Directory /var/ftp/ratio>
<Limit ALL>
DenyAll
</Limit>
HideNoAccess on
</Directory>
Finally here are the details about which release & which package:
root@server:
Description: Ubuntu 9.10
Release: 9.10
root@server:
proftpd-mod-mysql:
Installed: 1.3.2-3
Candidate: 1.3.2-3
Version table:
*** 1.3.2-3 0
500 http://
100 /var/lib/