Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Syncing real hdd space with proftpd mod_quotatab_sql data
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
qQsh
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jan 2005
Posts: 86

PostPosted: Sat Mar 12, 2005 9:08 pm    Post subject: Syncing real hdd space with proftpd mod_quotatab_sql data Reply with quote

All users of proftpd`s mod_quotatab_sql knows about that "small" problem - it counts uploaded ammount of data and if you delete file from via FTP, this ammount of uploaded data increases. Ideal and logical, but... What happens if i delete file from user`s directory from terminal? Mod_quotatab_sql thinks it still have same ammount of uploaded data but really that ammount are smallest becouse some files was deleted from terminal or web-application.

For example:
* User have FTP Quota - 100MB
* User uploaded some files and got 70MB of 100MB
* User deleted some files - 30MB - in other way than FTP, for example, php script
* mod_quotatab still thinks about quota 70MB of 100MB (becouse it reads info from mysql) but really user was used only 40MB of 100MB

Currently i am thinking about writing small script or application which sometime will check real ammount of data in user`s directory and updates info to mysql table of mod_quotatab_sql.

Maybe someone knows any other solution for this problem...


P.S. Sorry for my bad English... I hope i was explained enought understandable.
Back to top
View user's profile Send private message
qQsh
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jan 2005
Posts: 86

PostPosted: Mon Mar 14, 2005 8:07 pm    Post subject: Reply with quote

Really anyone can`t say somethink about this problem?
Back to top
View user's profile Send private message
bravecobra
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2002
Posts: 130
Location: Planet Earth (sometimes)

PostPosted: Mon Mar 13, 2006 9:46 pm    Post subject: Reply with quote

This perl script calculates the current amout of diskspace and files in a directory. Maybe you can use this to update your tallies table. I found it in a article concerning mod_quota : http://www.castaglia.org/proftpd/doc/contrib/ProFTPD-mini-HOWTO-Quotas.html

http://www.castaglia.org/proftpd/contrib/diskuse
_________________
Brave Cobra
http://www.bravecobra.com
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum