Knowledge Base
Accounts
Billing and payments
Cloud server volumes
Cloud servers
Cloud storage
Customer portal
Data centers and network
Data privacy and data portability
Dedicated servers
Firewall
How it works
Kubernetes clusters
L2 segments
Linux administration
Load balancing
Support
VPN to GPN
Windows administration
Embargoed and Sanctioned Countries
How to setup FTP server on Ubuntu 16.04
If you need to upload files on a server or give access to your employee/colleague so they would set up your website, an FTP-server will be the best solution.
All commands during the FTP-server installation are to be performed by a root user:
VSFTPD is a popular FTP-server that is located in Ubuntu standard repository. To install it, run the command:
After the process is completed, an FTP can be considered installed.
Settings
After installation, the first thing you need to do is to configure the FTP-server to fit your needs using the file located in /etc/vsftpd.conf. The file is quite detailed and understandable, yet we recommend that you change some of the settings:
Before starting an FTP-server, add the line /usr/sbin/nologin to the file /etc/shell, so the users could connect to the FTP without shell access:
Now you can start the FTP-server:
Add some changes to the file /etc/hosts.allow, prohibit access from all IP-addresses except for those that you are going to use to connect to the FTP-server:
Add a user, prohibit ssh connection, create a home directory.
After the user is created, change the password:
If you need to add a new user who needs to edit the files of the existing user, then you need to create a new user using the same UID and GID.
To check the UID and GID run the command: