How to configure ProFTP server...

Posted on 2003-11-25
Last Modified: 2007-12-19
I want to set up an FTP server on my Redhat 9 server.  Looking around, I've seen many posts stating that ProFTP is the way to go.  Correct me if you think differently.  I've installed the ProFTP package via Synaptic and have it running.  I can connect to it with a FTP client, but now I want to configure it to my needs.  However, I'm a bit confused looking through the /etc/proftpd.conf file.  I've installed Webmin and have tried to configure ProFTP through its module, but I'm still a little confused on how best to set this thing up.

1.  I'll probably have 5 - 10 users, with no anonymous access.  Do I have to create Linux user accounts for these accounts, or does ProFTP have its own user database that I can maintain?
2.  Currently when I login with an FTP client with my Linux user account (not root), I see my home directory, including hidden files.  I want the FTP home directory to be on a second drive I've installed (/mnt/datadisk/ftpdata) rather than the Linux users home directory.  And users are LOCKED into this folder, and with no way to access other system files.  Different users will have access to different folders on this drive.  Some will have access to all, and others only have access to one or two.
3.  Security is also a big concern.  From my experience FTP servers are easily hacked, I don't want mine to get hacked!

I'm migrating everything I have from Windows to Linux... help me if you can!
Question by:chadly2
  • 2
  • 2
LVL 12

Assisted Solution

paullamhkg earned 100 total points
ID: 9822048
1. yes, you need to create linux user accounts.

2. if you want to fix the users to login to their own home directory and can't access others directory CHROOT will be the solution on this have a check here

3.  have a look here which using the ProFTP over ssh.

you might also thinking of VSFTP instead, which mean very secure FTP, have a check here and here for more info abt VSFTP.

Hope this info can help
LVL 40

Expert Comment

ID: 9824221
I'll have to disagree disagree with paullamhkg on this...

(1) Yes, ProFTP is capable of having FTP only accounts that don't correspond to Linux accounts. Authentication and user home dir  definition can take place via ProFTP passswd/group files.  This is enabled by including:

AuthUserFile  /etc/proftpd.passwd
AuthGroupFile /etc/

in the global section o the proftpd.conf file. There's a tool for creating ProFTP passwd/group files in the contrib area  of the ProFTP source distribution (and HTML doc's for it).

(2) Including the following directives in the configuration will chroot the FTP user into their home dir then preventing them from seeing anything out side of that area.

DefaultRoot ~
DirFakeUser on ~
DirFakeGroup on ~

(3) ProFTP has a pretty good record with respect to security vulnerabilities. You do have to keep it up to date, but that's true of it and everyother piece of S/W (including RH 9).

Author Comment

ID: 9828359
Okay, I switched to vsftpd for two reasons.
1.  The links that paullamhkg provided showing that vsftpd is very secure, secure enough for the big dogs to use it (Redhat, SuSE, etc...)
2.  Ease of setup.  ProFTP may have more features, but vsftpd seems to be a lot easier to configure.

Here's how I've delt with my original 3 issues so far:

1.  I'm using Linux accounts for my ftp users.  There is an advantage to this in my case since my users will be uploading files, and this looks to be an easy way of keeping track of who uploaded the file and prevent other users from deleting other users files.  However, since usernames/passwords are passed in clear text, I'm wondering if this is a bit of a security issue.  (see item 3 below)

2.  In the /etc/vsftpd/vsftpd.conf file I uncommented out these settings:
I then created the vsftpd.chroot_list text file with the list of ftp users that should be locked into their home directory (which I've set to /mnt/datadisk/ftp_data).  However, this still poses a security issue.  Non ftp users that have accounts on this machine can connect via ftp if they want to.  It will place them in their home directory with the ability to navigate out of it.  Just wondering if there is a way to only allow a specific group of Linux users the ability to use the ftp service.

3.  Security.  Still not clear on this one.  Sending clear text username/passwords doesn't seem like a good idea.  The data I'm sharing isn't that sensitive, but it should NOT be accessible to hackers clever enough to sniff out username/passwords.  Are there any "easy" solutions to configure vsftpd (or ProFTP) to use SSL connections or at least encrypted passwords (MD4 or MD5).  My next level of security will be to create an access list on my firewall that only allows specific source IP addresses of my FTP users.

Maybe WebDAV is a better way to go?  I'd like to get a WebDAV server set up to share Mozilla Calendars and Mac Calendars anyway.   I've played with it a bit, but I'm a bit stumped.  I'll probably post another question concerning WebDAV today.
LVL 40

Accepted Solution

jlevie earned 150 total points
ID: 9838974
From what I see that you want to accomplish I believe that vsftp isn't the correct choice. From my reading of its docs (and playing with different configurations of it) I don't see it being capable of doing what ProFTP can do.

Your goals, as I see them, are to protect the server from unauthorized access and to limit each FTP user to only being able to see their own files. Using ProFTP's AuthUserFile directive this is easily done. When that directive is in place only users in the ProFTP password file have access to FTP and they are all chroot'd to the "home dir" as specified in the password file. For security reasons I never create a ProFTP account with the same username & password as a Linux account. In most cases I'll make the UID/GID of each FTP account be nobody/nobody. This means that the exposure of the plain text username and password isn't much of a security issue. The only thing an attacker who has captured this account information can do is to access the FTP account, and they are doing so as nobody.

While there are ways of protecting an FTP transaction by encrypting the session, there are few FTP clients that can do that. If you really nedd to protect the account information and the data you need to ditch FTP and only allow scp/sftp access. The down side of that is that you are back to having to have Linux accounts for each user and there's no easy way to chroot a user. Creating an FTP server where FTP users aren't Linux accounts, like above, is a reasonable compromise.

BTW: The "big dogs" use vsftp more for its speed than for security issues. By and large their FTP servers are set up for download only (read only access). They need to support lots of sessions and transfer lots data, so speed and resource consumption is very important. ProFTP, NcFTP, and vsftp all have excellent records, security wise. It has been the FTP servers based on the old BSD code (wu-ftp, etc) that have created a bad rep for FTP.

Author Comment

ID: 9883470
Okay, jlevie you have several valid points...  I have vsftpd running on my Redhat 9 box, so I'm going to leave it as is for the time being.  I'm building a new SuSE 9 Pro machine right now.  (I haven't decided on distribution of choice yet.)  I'm going to configure ProFTP on it.  I'll check back in when I have it running.

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question