Quick “how to”: ProFTPd chroot, speed up connections and enable passive connections
This post is a really quick “how to” – working with ProFTPd on Debian Linux and will explain how to chroot your FTP users, speed up connections and enable passive connections which can be very handy for those behind firewalls.
You’ll first need to locate your main ProFTPd config file which on my system is in /etc/proftpd/proftpd.conf then you can simply add/amend (or un-comment if the line(s) already exist) the following lines:
chroot users to their home direcory:
This simply chroots the user to their home directory. ProFTPd by default uses Unix system users so this will be the system users home directory as you specified when you created the user using e.g. useradd -d /home/ftp_user my_ftp_user. You will need to ensure that the unix user has the necessary permissions on their home directory otherwise the connection will fail.
Speed up initial connections to the ProFTPd server:
This disables ProFTPd’s default behaviour of looking up information about the machine which is connecting to it and thus markedly improves the initial connection speed to the ProFTPd server.
Enable passive FTP connections:
PassivePorts 49152 65534
This allows ProFTPd to use a range of ports which are most often used for passive connections. You can change the port range if you need to, the first number is the lower limit, the second is the upper limit.
That’s it! I hope that’ll help someone out…
|This entry was posted by Neil Craig on August 16, 2010 at 6:28 pm, and is filed under Sysadmin. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site.|
No comments yet.
about 1 year ago - 4 comments
It’s been quite some time since I’ve had the pleasure of using BackupPC, a delightfully simple to use yet very effective, free, open source, cross-platform backup system. My test rig was sorely overdue some proper backups…So I decided to install BackupPC on a central server to back up the others (which are all Debian or More >
about 3 years ago - 1 comment
We’ve recently been working on a Web-Server migration for a regular client at work, part of which involved transferring the MySQL Databases (or strictly the schemas) for each of their websites from their old Web-Server to the shiny new replacement. In doing this, I rediscovered a really handy method which really simplifies transferring MySQL data More >