![]() |
[Howto] Fix wrong data in the proftpd accounting - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Contributions Area (/forum-40.html) +--- Forum: Howtos (/forum-41.html) +--- Thread: [Howto] Fix wrong data in the proftpd accounting (/thread-14787.html) |
[Howto] Fix wrong data in the proftpd accounting - aseques - 07-15-2011 08:49 PM There's a problem (although I couldn't find a ticket for it) about proftpd and quotas. Currently whenever a new domain is created ispcp adds ads a new record in quotalimits, the field bytes_in_avail is set to the maximum space available for that domain. Afterwards, everytime the user uploads or deletes something the field bytes_in_avail in the table quotatallies gets increased or decreased depending on the action. The problem is that sometimes different events can trigger changes not accounted by the proftpd, like the admin removing infected files or some random actions with the ftp client. This script will prepare the queries to update the values for all you domains, after that you've the run the queries yourself. You also need to download the diskuse tool from this page: http://www.castaglia.org/proftpd/contrib/diskuse Code: #!/bin/sh Any improvements will be gladly accepted, also a rewrite would be nice, this script is quite hackish.. RE: [Howto] Fix wrong data in the proftpd accounting - aseques - 07-15-2011 10:52 PM Added some comments to the code after finding a couple of issues |