View Single Post
Old 02-13-2008, 08:16 PM  
Yil
Too much time...
 
Join Date: May 2005
Posts: 1,194
Default

Quotas is a rather interesting technical issue. Here's some thoughts...

1) Most window's based FTP servers I believe run as whatever user started them and account information is kept internally and directory details are usually stored in an extra file in the directory and thus all files are usually owned by one person.

There are many advantages (and disadvantages) to this, but right now the only one I want to focus on is that the FTP must ensure that it's internal information is consistent with the filesystem's. This is an issue because FTP accounts are not OS accounts and thus you just can't ask the file system for usage details.

2) How do you handle external modifications of the filesystem? If I go and delete a bunch of dirs in explorer how does the FTP find out about this and return the quota to the appropriate users? Assuming local drives this can be handled/caught when the FTP is running, but only periodic scans of the filesystem would catch changes made when the FTP isn't running.

Ok, having said all that it is possible to fake quotas right now by overloading the section information stored with accounts and using scripts to control things... You will still have the problem of external manipulation but even that could be solved the same why the FTP would have to do it. Namely, keep a list of files/dirs in a log somewhere and when a periodic scan turns them up missing credit back the quota. If they were just moved the scan would pick up the new entry and things would balance out...
Yil is offline   Reply With Quote