Tutorial

How To Set Up ProFTPD on Ubuntu 12.04

Published on June 20, 2012
How To Set Up ProFTPD on Ubuntu 12.04

Status: Deprecated

This article covers a version of Ubuntu that is no longer supported. If you are currently operate a server running Ubuntu 12.04, we highly recommend upgrading or migrating to a supported version of Ubuntu:

Reason: Ubuntu 12.04 reached end of life (EOL) on April 28, 2017 and no longer receives security patches or updates. This guide is no longer maintained.

See Instead:
This guide might still be useful as a reference, but may not work on other Ubuntu releases. If available, we strongly recommend using a guide written for the version of Ubuntu you are using. You can use the search functionality at the top of the page to find a more recent version.

About ProFTP

ProFTPD is a popular ftp server. Because it was written as a powerful and configurable program, it is not necessarily the lightest ftp server available for virtual servers.

Warning: FTP is inherently insecure! Consider configuring ProFTPd to use SFTP, a secure alternative to FTP implemented under SSH.

Step One—Install ProFTP

You can quickly install ProFTP on your VPS in the command line:

sudo apt-get install proftpd

While the file is installing, you will be given the choice to run your VPS as an inetd or standalone server. Choose the standalone option.

Once the file finishes downloading, the ProFTPD server will be on your droplet. However, we still have to make a few changes to the configuration.

Step Two—Configure ProFTP

Once ProFTPD is installed, you can make the needed adjustments in the configuration. Unlike some other FTP configurations, ProFTPD disables anonymous login from the outset and we only need to make a couple of alterations in the config file.

Open up the file:

sudo nano /etc/proftpd/proftpd.conf

Go ahead and make a few changes:

  • Change the Server Name to your host name
  • ServerName                      "example.com"
  • Uncomment the line that says Default Root. Doing so will limit users to their home directory.
  • # Use this to jail all users in their homes
     DefaultRoot                    ~

Once you have finished those adjustments, you can save and exit.

Restart after you have made all of your changes:

sudo service proftpd restart

Step Three—Access the FTP server

Once you have installed the FTP server and configured it to your liking, you can now access it.

You can reach an FTP server in the browser by typing the domain name into the address bar and logging in with the appropriate ID. Keep in mind, you will only be able to access the user's home directory when connecting to the virtual server.

ftp://example.com

Alternatively, you can reach the FTP server through the command line by typing:

 ftp example.com

Then you can use the word, "exit," to get out of the FTP shell.

By Etel Sverdlov

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the authors

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?
 
63 Comments
Leave a comment...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

What would the default username and password be for these?

Moisey Uretsky
DigitalOcean Employee
DigitalOcean Employee badge
September 17, 2012

ProFTPd will automatically use your existing users and any user that you add to the virtual server with a valid shell will also have FTP access.

Thanks

Will it help to transfer files from my other current server to digital ocean server.Is there any tool,which can let me transfer files as easily as I do from My PC to Server using Filezilla with just drag and drop graphical interface and can be used to transfer files from 1 Server to another server without downloading files to Home PC,everything with webinterface. Or some to be installed on home PC but can Transfer files between 2 servers easily. Please create some detailed tutorial on that. Thanks

This comment has been deleted

    Your instructions have an error up front:

    Step One—Install ProFTP You can quickly install VSFTPD on your VPS in the command line:

    ProFTP and VSFTPD are two completely separate programs.

    Moisey Uretsky
    DigitalOcean Employee
    DigitalOcean Employee badge
    December 13, 2012

    Thanks, updated so its consistent for ProFTP =]

    Moisey Uretsky
    DigitalOcean Employee
    DigitalOcean Employee badge
    December 13, 2012

    Look for an FTP client that does FXP - FXP allows you to do file transfers via FTP between two different servers using a graphical interface on your PC.

    There were a few clients that I’ve used in the past that supported like CuteFTP but that was more than a few years ago.

    After this tutorial setup, I was able to login via filezilla, but I cannot upload files on my var/www directory. When I restrict home access on proftpd config file I can only see my home directory but I need to upload on var/www, Then i just remove the restrict home access so that i can access ftp from root directory, But the problem is I cannot upload any file at var/www directory

    Moisey Uretsky
    DigitalOcean Employee
    DigitalOcean Employee badge
    January 15, 2013

    Check the permissions of /var/www they are probably owned by a different user/group than the user you are logging in as.

    You can get around this by adding the user to the same group that owns /var/www and then setting /var/www to group writeable.

    chmod -R g+w /var/www

    Thanks raiyu… now it is working! you are a genius and Thank you digital ocean for this awesome server for a very low cost but yet the best server I ever had for years!

    Moisey Uretsky
    DigitalOcean Employee
    DigitalOcean Employee badge
    January 15, 2013

    Awesome, glad you got it working =]

    Can I create ftp for different directories ? and I want to make my domain as an ns1.cms50.com ns2.cms50.com how can I do this? please guide me.

    Moisey Uretsky
    DigitalOcean Employee
    DigitalOcean Employee badge
    January 31, 2013

    By default you can have different users access their home directories using ProFTPd.

    As for setting up ns1/ns2 you would need to create two separate virtual servers and install Bind on them to manage your DNS or run a different DNS daemon.

    We do not yet currently have an article on that but will be adding one soon.

    i getting this error when i login into filezilla Connection attempt failed with “ECONNREFUSED - Connection refused by server”.

    any help please

    I just followed these instructions and installed ProFTP. One minor nit is that the “DefaultRoot” line was already commented out.

    my password VPS don’t work ;/ i change username in .conf file, it’s don’t helps

    Moisey Uretsky
    DigitalOcean Employee
    DigitalOcean Employee badge
    February 5, 2013

    Hi Yannikkoval, might be better if you opened up a support ticket so we can correspond directly about the issue that you are having, will be easier for us to review your full config and troubleshoot the specific issue you ran into.

    Hi it doesn’t work for me when i sudo service proftpd restart it fail telling me cache : Memcache support not enable so i try to install Memcache module and try again to restart proftpd but still same message aboit Memcache???

    I forgot this line too

    Fatal: DeferWelcome: expected Boolean parameter on line 17 of ‘/etc/proftpd/proftpd.conf’

    Ok i found the problems i put . where it shouldn’t be :)

    I tried to login as ftp with root usernae and password but it gave me error 530

    I setup proFTPD, but when I lo in, I can’t get to the root or any other directory except the one containing the following files: .bash_history, .bash_logout, .bashrc, .nano_history, .profile

    How do I fix this? The other day I also had VSFTPD working, but after wiping a droplet clean I can’t get either FTP server to work!

    I installed Proftpd, but it does not allow to upload any files. what can it be?

    Error: Could not upload “untitled file.”

    thank you

    I’m accessing the root user

    Great tutorial. Got it working right off the bat. Thanks!

    when trying to log in I am getting an error, ‘connection closed without indication’. What would this indicate?

    Kamal Nasser
    DigitalOcean Employee
    DigitalOcean Employee badge
    May 14, 2013

    @Rochelle Alder: Check /var/log/proftpd/proftpd.log for errors. Is proftpd running and listening on port 21? You can run netstat -plutn to verify that it is listening on port 21 by making sure proftpd is there.

    when I tried ftp as root username and root pass, it alerts “530 Login incorrect”, but I still can SH to our server with that root account. Please advice.

    Thanks

    Kamal Nasser
    DigitalOcean Employee
    DigitalOcean Employee badge
    May 16, 2013

    @tienhien: Please take a look at the answers on this topic: http://ubuntuforums.org/showthread.php?t=1104166

    With what exact password and username do I need to login? I keep getting a 530 login error…

    Kamal Nasser
    DigitalOcean Employee
    DigitalOcean Employee badge
    May 21, 2013

    @tobi the same username/password combination you use for SSH.

    I’ve tried it for my root but I can’t connect.

    Hi Raiyu,

    I read your comment above

    raiyu Check the permissions of /var/www they are probably owned by a different user/group than the user you are logging in as. You can get around this by adding the user to the same group that owns /var/www and then setting /var/www to group writeable.

    chmod -R g+w /var/www

    Posted January 15th, 2013 02:34

    How do i go about checking the permissions or adding a user to the group. Do you do this in webmin or server cmd prompt?

    Kamal Nasser
    DigitalOcean Employee
    DigitalOcean Employee badge
    June 10, 2013

    You can run the stat command on a directory/file to check its permissions. If stat /var/www outputs Group: www-data, you have to add your user to the www-data group: usermod -a -G www-data youruser

    Strangely, but there is no access to ftp, use root user

    Kamal Nasser
    DigitalOcean Employee
    DigitalOcean Employee badge
    July 4, 2013

    @vitalya.kravchuk: You can’t log in as root via FTP. You have to create a new user:

    https://www.digitalocean.com/community/articles/initial-server-setup-with-ubuntu-12-04

    I setup PROFTPD as instructed above and used the inet option during the install. I changed the conf file as instructed above. I cannot start it because I get this message:

    ProFTPD warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration.

    What should I do?

    Can I uninstall it?

    Kamal Nasser
    DigitalOcean Employee
    DigitalOcean Employee badge
    August 23, 2013

    @billmarel: Edit <pre>/etc/proftpd.conf</pre> and set ServerType to <pre>standalone</pre>

    Restart ProFTPD:

    <pre>sudo service proftpd restart</pre> Does that fix it?

    Yes it did fix it but for others who may likewise suffer, the file to edit is /etc/proftpd/proftpd.conf

    cannot LOGIN using new user, even I can login ssh, but cannot login proftpd, this tuts NOT WORK! maybe this tutorial out date! please update!

    Kamal Nasser
    DigitalOcean Employee
    DigitalOcean Employee badge
    August 26, 2013

    @rohimkudus: Are there any errors in the error logs? <pre>tail /var/log/proftpd/proftpd.log</pre>

    After running through the instructions, I used Filezilla to FTP in and it kept setting the “Remote site” to the Home directory – I wanted to access the Web root. Then it dawned on me, instead of (in proftpd.conf):

    Use this to jail all users in their homes

    DefaultRoot ~

    I needed it to be:

    Use this to jail all FTP clients to the Web root:

    DefaultRoot /var/www/

    For all, who experienced 530 error with correct login and password (which worked in SSH, for example), try out: nano /etc/proftpd.conf then uncomment this RequireValidShell Off after saving, restart service, and it should work!

    A viable and secure alternative to ProFTP is SFTP: <a href=“https://www.digitalocean.com/community/articles/how-to-use-filezilla-to-transfer-and-manage-files-securely-on-your-vps”>How To Use Filezilla to Transfer and Manage Files Securely on your VPS</a>.

    If you do not logs, and since you have the user belonging to the group and checked the iptables ftp, verify that these parameters are correct:

    RequireValidShell off

    How do I create a user and password to access ProFTP? I know that you can not use your root account, but I do not have any other users setup on my server.

    Having problem memcache after installing proFTPD? Here some trick: For ex your host name is : my.domain.com

    When you edit /etc/proftpd.conf = ServerName “domain.com” Change it to = ServerName “my”

    The problem because standart Apache2 SSL snake oil. Don’t forget to change it after you generate new SSL !!! Ad, Read for memcache : https://www.digitalocean.com/community/articles/how-to-install-and-use-memcache-on-ubuntu-12-04

    hello, I can not connect to proftpd here is the netstat command ++++++++++++++++++++++++++++++++++++ demo@great:/var/log/proftpd$ netstat -plutn (No info could be read for “-p”: geteuid()=1000 but you should be root.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN - tcp6 0 0 :::22 :::* LISTEN

    ++++++++++++++++++++++++++++++++++++ sudo service proftpd restart ++++++++++++++++++++++++++++++++++++ demo@great:/var/log/proftpd$ sudo service proftpd restart sudo: unable to resolve host great.microficher.com [sudo] password for demo:

    • Stopping ftp server proftpd [ OK ]
    • Starting ftp server proftpd great.microficher.com proftpd[31349]: mod_tls/2.4.3: compiled using OpenSSL vers ion ‘OpenSSL 1.0.0e 6 Sep 2011’ headers, but linked to OpenSSL version ‘OpenSSL 1.0.1 14 Mar 2012’ library great.microficher.com proftpd[31349]: mod_sftp/0.9.8: compiled using OpenSSL ver sion ‘OpenSSL 1.0.0e 6 Sep 2011’ headers, but linked to OpenSSL version ‘OpenSSL 1.0.1 14 Mar 2012’ library great.microficher.com proftpd[31349]: mod_tls_memcache/0.1: notice: unable to re gister ‘memcache’ SSL session cache: Memcache support not enabled great.microficher.com proftpd[31349]: warning: unable to determine IP address of ‘great.microficher.comgreat.microficher.com proftpd[31349]: error: no valid servers configured great.microficher.com proftpd[31349]: Fatal: error processing configuration file ‘/etc/proftpd/proftpd.conf’ [fail] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    need advice… thanks

    Kamal Nasser
    DigitalOcean Employee
    DigitalOcean Employee badge
    April 4, 2014

    @freaky_irish: Assuming your droplet’s hostname is great.microficher.com, adding the following line to /etc/hosts should fix it: <pre>127.0.0.1 great.microficher.com</pre>

    Here’s how you can add users to one or more document root without much pain. It’s all provided by the ProFTPd syntax. :-)

    https://gist.github.com/gabrieleromanato/10302208

    Good tutorial, I’ve run through it all and I can get ftp to work through ssh on putty however, when trying to access ftp through a browser or Filezilla I cannot make a connection.

    Any other settings that might prevent a connection?

    Kamal Nasser
    DigitalOcean Employee
    DigitalOcean Employee badge
    August 7, 2014

    @scott.xdarkaurax: Is ProFTPd running and listening on port 21? What’s the output of the following command?

    sudo netstat -plutn | grep :21
    

    Try starting ProFTPd:

    sudo service proftpd start
    

    I have followed this tutorial but I can not connect.

    After doing in the terminal “ftp servername” and being prompted for the username and password, I get the answer:

    421 Service not available, remote server has closed connection Login failed. No control connection for command: No such file or directory

    I did this command: sudo netstat -plutn | grep :21

    and I get:

    tcp6 0 0 :::21 :::* LISTEN 22380/proftpd: (acc

    I can ssh with the credentials I have used (a user of the system)…I have defined a new user on the database ftpd on phpmyadmin and I can’t also connect with that user…

    Can anyone help me to sort this out?

    Thank you.

    True beginner here. I opened up the Console for my droplet and got the terminal, then entered: sudo apt-get install proftpd

    and nothing happens.

    Am I supposed to do it in the Console access this way or do I have to access it through PuTTY then enter the command line above? It shouldn’t matter right?

    Kamal Nasser
    DigitalOcean Employee
    DigitalOcean Employee badge
    October 24, 2014

    Either way works, it doesn’t matter if you are using PuTTy or the remote console. Did you try pressing enter after typing in the command?

    It turned out, I was in the grunt shell. I had to type “grunt &” command first, then it worked. Was able to install and configure it afterwards. Thanks.

    When I start on a fresh clean server with nothing else done to it and run these directions to the T…when I get to the step to Resttart the server after saving the config file…it will not restart…it simply says this “ProFTPD warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration.” I have tried everything with no luck =( I just need FTP on this server so that another server can FTP backup files to this server…the other server is a shared hosting website and cannot run other programs it has a script that will FTP files though so I need FTP working! Any ideas on what could be wrong? MY server is brand new with Ubuntu 14.xx

    When I access via browser it asks for login, then I try my default root and I’m unable to login…

    Ok so everytime I login it gives me the error:

    530 Login incorrect. Login failed. Remote system type is UNIX Using binary mode to transfer files. ftp>

    So I need to login with the same credentials of the vps?

    Hi

    Do you have any information on how to update proftpd 1.5.3rc3 to 1.3.6? The is an vulnerability in 1.5.3 apparently for mod_copy which is resolved in 1.36

    Thanks

    Matt

    So I’m using ProFTPd but only connect once every few weeks to transfer file and update a web application.

    My problem is this: when I try to connect, ProFTPd is usually down (given that it’s been a while since my last login) and I’m forced to login to the console/terminal and restart it. Then I can connect without a problem (I use Filezilla).

    Does anyone know why ProFTPd will shut down regularly - is it a configuration issue? :|

    Hello. You forget few moments. By default port 21 is blocked via firewall and better way is create different ftp user. So, step 4: (add shell) add to /etc/shells /bin/false

    step 5: (need add ftp user) useradd ftpusername -p passwordforftpuser -d /var/www/html -s /bin/false

    step 6: (change password for this user) passwd ftpusername

    step 7: (open default ftp port, 21)

    for check opened ports type: ufw status verbose and press enter if don’t see 21 in column “To” type ufw allow 21 (for ipv6) and press enter. Then type ufw allow 21/tcp (for ipv4) and press enter. Done.

    Now you can connect to your ftp with ftpusername and password was added earlier.

    I do not have login and ftp access, how can I access it?

    Try DigitalOcean for free

    Click below to sign up and get $200 of credit to try our products over 60 days!

    Sign up

    Join the Tech Talk
    Success! Thank you! Please check your email for further details.

    Please complete your information!

    Become a contributor for community

    Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

    DigitalOcean Documentation

    Full documentation for every DigitalOcean product.

    Resources for startups and SMBs

    The Wave has everything you need to know about building a business, from raising funding to marketing your product.

    Get our newsletter

    Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

    New accounts only. By submitting your email you agree to our Privacy Policy

    The developer cloud

    Scale up as you grow — whether you're running one virtual machine or ten thousand.

    Get started for free

    Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

    *This promotional offer applies to new accounts only.