15

How to configure FTP server in my Ubuntu 12.04 or 13.04.What to install and how to configure.

Braiam
  • 69,112

2 Answers2

20

To install an FTP server, try out vsftpd. To install, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install vsftpd

Once installed, you need to edit the config file

sudo gedit /etc/vsftpd.conf

Make sure that you change the items shown in the image below.

enter image description here

Once done, do

sudo service vsftpd restart

For more info and documentation, visit vsftpd and FTP Server Guide on Ubuntu

GunJack
  • 359
Mitch
  • 109,787
0
  1. Fedora, RedHat, SUSE distros:

    dnf -y vsftpd 
    
  2. Ubuntu, Debian-based distros:

    sudo apt-get install vsftpd 
    
  3. ArchLinux-based distros:

    sudo pacman -S vsftpd 
    

That wasn’t so tough. Now on to configuring the FTP server. Mostly the configuration is in /etc/vsftpd.conf, with lots of documentation already in the config file.

For more info, run:

man vsftpd.conf 

Here are a few things you might want to update in the config file:

write_enable=YES #if you want people to be able to upload to the server 
local_enable=YES #allows users in /etc/passwd to login with their linux username/password 
anonymous_enable=YES #Allows anonymous login 
no_anon_password=YES #No password required for anonymous login 
anon_max_rate=30000 #Max transfer rate for anonymous client in Byte/sec 
anon_root=/example/directory #Directory that anonymous users will see.

Chroot Jail config

chroot_list_enable=YES #prevents users from leaving the ftp dir chroor_list_file=/etc/vsftpd.chroot_list #specifies he file to which the users are contained.

If you want to have only specific users able to log into the FTP server, add this to the config file:

userlist_enable=YES 
userlist_file=/etc/vsftpd.userlist #populate with allowed users 
userlist_deny=NO 

Now that you’ve configured your FTP server, time to restart to pick up the new config.

sudo systemctl restart vsftpd 

Also check this article: Install and configure FTP Server on Ubuntu 18