LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-21-2011, 06:27 AM   #1
kamaradski1
LQ Newbie
 
Registered: Oct 2011
Location: Currently in Bulgaria
Distribution: Xubuntu, Turnkey-LAMP, Turnkey-CORE
Posts: 22

Rep: Reputation: Disabled
ftp-server with bandwidth & storage quota


Hi all,

I was asked to build a ftp-server with bandwidth & storage quota in a Linux environment for a medium size company.

- Approx 100 users.
- Storage located locally and partially on a NAS.
- Storage quota per user or user\group
- In addition to the disk-quota, one group of external users will need to be limited by monthly band-weight usage.

The storage and band-weight quota's are essential in this setup.

Sounds not to hard if you work with Windows, however i'm having a hard time to do the same in Linux.

I would be more then grateful if someone could point me in the right direction ?

Thanks
kamaradski
 
Old 11-22-2011, 06:52 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Have a look at pure-ftpd

Regards
 
1 members found this post helpful.
Old 11-24-2011, 03:40 PM   #3
kamaradski1
LQ Newbie
 
Registered: Oct 2011
Location: Currently in Bulgaria
Distribution: Xubuntu, Turnkey-LAMP, Turnkey-CORE
Posts: 22

Original Poster
Rep: Reputation: Disabled
Thanks for the reply bathory,

I did read all the pure-ftpd documentation to find a few big disadvantages:

- Virtual file quotas instead of kernel quotas, (easy to fool, and not very accurate)
- And most importantly i couldn't find a bandwidth quota option like i asked above. (only bandwidth throttling)

Hopefully anyone else has a more fitting solution ?

Thanks
kamaradski
 
Old 11-24-2011, 04:50 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Having used the 3 more common ftp servers (vsftpd, proftpd and pure-ftpd), I can only see pure-ftpd having the features you want.
If you don't like the "virtual files" quota, you can use quotas in filesystem.

Regarding bandwidth, I think you misread its features. Except bandwidth throttling, there is also plain bandwidth management.
Quoting from pure-ftpd documentation:
Quote:
- '-T <bandwidth>' and '-t <bandwidth>': Enable bandwidth limitation (see
below) . <bandwidth> is specified in kilobytes/seconds. To set up separate
upload/download bandwidth, the [<upload>]:[<download>] syntax is supported.
Regards
 
1 members found this post helpful.
Old 12-12-2011, 03:17 AM   #5
kamaradski1
LQ Newbie
 
Registered: Oct 2011
Location: Currently in Bulgaria
Distribution: Xubuntu, Turnkey-LAMP, Turnkey-CORE
Posts: 22

Original Poster
Rep: Reputation: Disabled
Hi bathory,

Thanks for the reply again, sorry for the late follow-up, i was very busy with a few other projects, however now it's back to the FTP-setup.

With your hint from the previous post i managed to figure out the file-quota system, and am using the native file-system quota.

However the bandwidth quota is still a problem. After re-reading the documentation i cannot figure out a way to do this. What i would need is the following:

For example:
Group(or user)-X would receive a 100GB file storage quota, however for bandwidth this group or user would be allowed to use a maximum of 200GB per month.

What i have read so far in any of the documentation is that i can only limit the max-speed per user but not the max used bandwidth..

Maybe i'm still reading it wrongly ?

Thanks
kamaradski
 
Old 12-12-2011, 04:29 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
What i have read so far in any of the documentation is that i can only limit the max-speed per user but not the max used bandwidth..

Maybe i'm still reading it wrongly ?
No you're reading right but you have the wrong bandwidth meaning. Bandwidth actually is the upload/download speed you want to reserve for your client(s) based on the total speed of your connection.
There is no such thing as "bandwidth quota" the way you describe it and surely the normal disk quota cannot be calculated on a per month basis
What you can do, is to take advantage of the pure-uploadscript feature and create a script to calculate the monthly uploaded files size and cut your users out once they reached the limit you want.

Regards
 
2 members found this post helpful.
Old 12-12-2011, 05:19 AM   #7
kamaradski1
LQ Newbie
 
Registered: Oct 2011
Location: Currently in Bulgaria
Distribution: Xubuntu, Turnkey-LAMP, Turnkey-CORE
Posts: 22

Original Poster
Rep: Reputation: Disabled
Ok, great that clears my path and set a direction to go towards.

I will also play around a little and see if i can utilize the sql database for this purpose.

i will post back here in case i figure it out.

Cheers
kamaradski
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Storage over VPN & Locally, Print Server & Mail Server parry1234 Linux - Server 0 10-26-2010 08:55 AM
ftp quota probs - 0kb files at quota limit ph_xm Linux - Newbie 0 02-02-2005 11:13 AM
Restricting Bandwidth to FTP server Boffy Linux - Networking 1 08-27-2004 01:56 PM
bandwidth control under proftpd ftp server adrianmak Linux - Networking 1 01-02-2003 03:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration