Web Hosting Talk







View Full Version : How to make Pure-FTPd respect System Quotas on Cpanel


sprintserve
07-03-2004, 06:01 AM
Dear all,

I had tested the following settings on a test Cpanel system we run and it works perfectly fine. I did some quick testing rather than extensive testing and this are the parameters I use. If you have any to add, please let me know and I will edit my post.

Thank you and begone diskspace abusers :)

Date of Writing: 3rd July 2004

Step 1:
You would need to download the latest Pure-FTPd stable package. At the time of writing this is version 1.0.19. Login on SSH and go to a directory where you store your sources. I use /usr/local/src in this example. You may have your own locations. In that case, just replace the first step.

cd /usr/local/src
wget ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.19.tar.gz
tar -zvxf pure-ftpd-1.0.19.tar.gz
cd pure-ftpd-1.0.19


Step 2:
Now you are ready to configure it and compile the new sources.

./configure --with-sysquota --with-everything --with-paranoidmsg --without-capabilities --with-virtualchroot --prefix=/usr/

Note: The first time round, I had compiled with just the switches I needed. But because I did not do extensive testing, I decided to just adopt the RPM switches and add the sysquota switch as well as the path to ensure minimal changes in case Cpanel complains.

I am also not going to reproduce the documnentation on what these switches meant. You can get it all at: http://www.pureftpd.org/README

For reference, this are the switches I used initially and I tested to work fine:

./configure --with-sysquotas --with-peruserlimits --with-puredb --with-ftpwho --with-language=english --with-boring --with-extauth --prefix=/usr/


Step 3:
You can now compile it.

make
make install


Step 4:
You are done!

/etc/init.d/pure-ftpd restart


Additional Note: In /etc/sysconfig/pure-ftpd , you would now have to take note of this switch:

--maxdiskusagepct=90

This basically means that once you hit 90% of your quota, Pure-FTPd will prevent you from uploading anymore. You can of course amend it to 100. But it's not advisable as things in the account will start failing (emails, stats amount others).

This switch was always there, but of course since Cpanel did not compile the RPM with the system quota switch, it's useless. But with this new compilation, this finally have some meaning and use.


That's all there is. Now enjoy your Pure-FTPd with quotas :)

Dacsoft
07-03-2004, 09:26 AM
Thanks for the post sprintserve.

sprintserve
07-06-2004, 04:15 AM
This can also solve this bug released here: http://secunia.com/advisories/11992/

Lastly if you mess up, you can do one of 2 things:

1. You can go to your WHM and reinstall the RPM for Pure-Ftpd

2. You can make a backup of your Pure-ftpd binary before you make / make install.

naguib2000
07-13-2004, 07:44 AM
thanks a lot sprintserve

Bashar
08-25-2004, 03:45 AM
upgrading to newer version say .20 from RPM won't lose the flags used with the tarball installation?

AlexF
08-25-2004, 03:37 PM
Thank you for the great post sprintserve. Maybe the mods can add it to the How-To section or pin it here.

Steven
08-25-2004, 08:16 PM
http://support.cpanel.net/pure-ftpd-1.0.20-9.tls.i386.rpm

works on most os

Bashar
08-31-2004, 03:38 AM
Originally posted by AlexF
Thank you for the great post sprintserve. Maybe the mods can add it to the How-To section or pin it here.

it is under howto section here :)


thelinuxguy: does this have quota support?

sprintserve
09-02-2004, 02:03 PM
Yes. It does apparently. This was posted before CPanel rolled that RPM. (about time :) )

timdorr
09-06-2004, 12:55 AM
I just noticed that pure-ftpd tarball myself. Looks to come with the 9.8.x branch, as it's only been updated on my EDGE test server.

sprintserve
09-06-2004, 02:34 AM
They been testing it for a while. I tested it recently and it does respect quotas among some other enhancements. (such as TLS if you like security)

wheimeng
09-18-2004, 04:35 AM
Will cPanel auto update from old pureftp version or we have to install it manually then?

sprintserve
09-18-2004, 04:48 AM
As far as I know, up to current builds (we don't do edge on any machine ), they haven't been using the new Pure-ftpd rpm yet. You can always download it and install it yourself.

wheimeng
09-18-2004, 04:52 AM
The RPM that Steve provided did not create /etc/sysconfig/pure-ftpd automatically?

Would like to have the feature of 90% warning.

sprintserve
09-18-2004, 05:01 AM
That RPM is not provided by Steve, but by Cpanel. I tried it once only on a test box, so I didn't check fully what it have and didn't have.

wheimeng
09-18-2004, 05:03 AM
Right, thanks, so I shall compile it manually.

Thanks.

p/s: Sorry, I meant the RPM link provided by Steve.

sprintserve
10-12-2004, 05:33 AM
Cpanel had rolled out the new RPM on their updates. So this should no longer be needed unless you needed some extra configurations (like us) The no. 1 thing would be large file support.