proftpd mod_ratio not working correctly

Bug #479963 reported by trithdurol
6
This bug affects 1 person
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:/var/ftp/ratio# more ratios
test|7|102404|1|51218
root@server:/var/ftp/ratio# more tmpratios
test|7|102404|1|51218

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:/var/ftp/ratio# more /etc/proftpd/proftpd.conf
[...]
<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:~/proftpd-1.3.2b/contrib# lsb_release -rd
Description: Ubuntu 9.10
Release: 9.10
root@server:~/proftpd-1.3.2b/contrib# apt-cache policy proftpd-mod-mysql
proftpd-mod-mysql:
  Installed: 1.3.2-3
  Candidate: 1.3.2-3
  Version table:
 *** 1.3.2-3 0
        500 http://de.archive.ubuntu.com karmic/universe Packages
        100 /var/lib/dpkg/status

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.