Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I create FTP users with a php script. I would like to give my users unique FTP folders. However I would like to limit the folders sizes to 1024MB/folder. How can I limit a folder size?

I use proftp with i-mscp. I create SQL rows for my FTP users.

share|improve this question

closed as not a real question by Tom O'Connor, MDMarra, Jeff Ferland, Khaled, Ladadadada Feb 23 '13 at 21:04

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
possible duplicate of Linux - quota per directory? –  Tom O'Connor Feb 22 '13 at 23:54
    
I thing, I don't need partitions for my FTP folders. –  user1709024 Feb 23 '13 at 0:01
    
I have got a free filesharing webpage. I would like to let the users upload with ftp. However my users can upload 1024 large files maximum. I would like to let them 1024MB FTP upload / day. –  user1709024 Feb 23 '13 at 0:13
    
Now you're making it more confusing. Are you limiting the folder size, or the traffic per day? –  Jeff Ferland Feb 23 '13 at 0:15
    
"free filesharing webpage" -- You don't have root on this box? Well. Good luck with that. –  Tom O'Connor Feb 23 '13 at 0:17

2 Answers 2

up vote 1 down vote accepted

Linux supports quotas for any applications which use the OS user for authentication / session / authorization. Googling for 'Linux quotas' turns up lots of good tutorials in the first page of matches.

And the good thing about using proper OS users / OS quotas is that you can continue to maintain the upload / storage functionality while you provide other methods of managing files and phase out FTP which is a dangerous and stupid protocol that belongs in the past.

share|improve this answer
    
What do you thing about this one? debian-administration.org/articles/47 Should it work? My users ask me for FTP protocol... :-s –  user1709024 Feb 23 '13 at 0:38
    
Does quota means automaticaly delete files that larger than quota? –  user1709024 Feb 23 '13 at 0:40
    
No it doesn't delete files it just won't allow you to create more when you reach the quota. As to which tutorial to read - read several. –  symcbean Feb 23 '13 at 0:42

Setting FTP quotas with ProFTPd. You should be able to work it out from there.

share|improve this answer
    
I don't thing I need new partitions. I have got options to make limit of my users webpage sizes. 100MB / host, or 1024Mb/host.. etc. However the don't own partitions. Somehow simple apache software do it. OR not? –  user1709024 Feb 23 '13 at 0:01
    
Probably not. At least not with any mechanism I've come across so far. Apache is a great webserver.. less so for managing directory usage. You could probably write something in PHP shudder –  Tom O'Connor Feb 23 '13 at 0:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.