Ftp Server Ubuntu

What is FTP?

Install FTP Server Ubuntu-File Transfer Protocol for FTP is a network protocol that is commonly used to move files between clients and servers once. Since then it has been replaced with faster, safer and more convenient file delivery methods.

Here is a list of some famous FTP servers.

  • FTPD

Introduction to Vsftpd

VSFTPD stands for Very Secure File Transfer Protocol Background Program. This is a GPL licensed FTP server for UNIX systems, including Linux. Safe and very fast and stable.


  • Configure a virtual IP
  • Virtual users
  • Independent or inetd operation
  • Strong per user configuration
  • Slowing bandwidth
  • IP configuration per source
  • IP resource limit
  • IPv6
  • Support encryption with SSL integration
  • Etc.

Installing and configuring Vsftpd with new FTP users.

Prerequisites: Ubuntu server with Sudo access.

Step 1 - Install vsftpd

$ sudo apt-get update Next
$ $ sudo apt-get install vsftpd Next
After installing, it is a good idea to keep the original configuration file for backup.

$ sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.orig

Step 2 - Set Up a User Directory and Set Owner

Create an FTP folder, add a user, and specify a directory for it.

$ sudo mkdir / home / emipro / FTP  next
$ sudo adduser --home=/home/emipro/FTP test_user Next

Create a new directory under the FTP directory and set the permission to 777.

$ sudo mkdir /home/emipro/FTP/Test Next
$ sudo chmod 777 /home/emipro/FTP/Test

Set ownership and make sure that you have deleted your write permission by using the following command:

$ sudo chown nobody:nogroup /home/emipro/FTP
$ sudo chmod a-w /home/emipro/FTP Next

After creating an FTP directory, we can add subdirectories with full access permission.

Step 3 - Configure FTP Access by making the following changes to the vsftpd.conf file

Open the configuration file.

$ sudo nano /etc/vsftpd.conf

To allow users to upload files, cancel comments in the write_enable settings.

write_enable = YES

Cancel the chroot_local_user comment to allow FTP users to access the directory assigned to them.

chroot_local_user = YES
chroot_list_enable = NO

Cancel Chroot_list_file and provide a path for the user list.

chroot_list_file = / etc / vsftpd.chroot_list

Add the user to the vsftpd.userlist for incoming access and FTP directories.

$ sudo vi /etc/vsftpd.userlist

Add test_user to the file (be careful: a user name for each line)

Add the following options to allow local users to log in via FTP.

allow_writeable_chroot = YES

Restart the Vsftpd service.

$ sudo systemctl restarts vsftpd

We can now access our FTP server with an ftp client application like FIleZilla.

Here are some common issues you may encounter:

Issue-1: 550 Cause directory operations to fail.

Cause: This error occurs when the subdirectory in the FTP root directory does not get full access; 777

Solution Install FTP Server Ubuntu:

$ sudo chmod 777 <FTP subdirectory path>

Issue-2: 500 OOPS: vsftpd: refuses to work with root that can be written with chroot ()

Cause: This error appears when one of the FTP root directories obtains full access or requires the actual permission. The home directory cannot be written by the user.

Solution Install FTP Server Ubuntu:

$ sudo chmod 555 <FTP dir dir yolu>

Note: Vsftpd only works with FTP and provides security for FTP
With Vsftpd, we can restrict users to their directories using chroot when connecting with ftp (port 21). However, if you are allowed to contact SFTP (port 22), this chroot prison will not work. Install FTP Server Ubuntu

Configure chroot security for SFTP,

1. Edit the file: / etc / ssh / sshd_config Next

vi / etc / ssh / sshd_config

2. Paste the following code at the end of the file

Sftp internal sftp subsystem
USER matching <user_name>
                                  ChrootDirectory <user's home directory>

              Built-in sftp ForceCommand

              X11 Submit no

              AllowTcpForwarding no

Change the user name and directory in the above line. Cancel the "Subsystem" comment if it is in the row above the configuration file.

NOTE: The user's home directory must have 755 permitted roots. Install FTP Server Ubuntu

3. Restart the ssh service

/etc/init.d/ssh restart

Incoming Search Terms :

  • FTP Server
  • FTP Client
  • SolarWinds