Ubuntu install ftp server and possible problems

Using Ubuntu 18.04, first use the apt command to install ftp

sudo apt install vsftpd

After the installation, you can actually run the ftp server. The configuration used is the default configuration. We can use netstat -ntl to view the ftp enabled port

You can see that the default port 21 is used, and then use the service command to view the status of the ftp server

**Then because the currently used ftp services are all running according to the default configuration, we can modify the configuration parameters according to our needs. The location of the vsftpd configuration file is /etc/vsftpd.conf. Let me talk about the first problem I encountered. There is a listen parameter (server monitoring) in the configuration file. This is to be turned on, but the default is NO, so I set it to YES, and then restart Server and check the status of the server, and found that status:failed appears, and there are two red parameters code=exited, status=2, here we need to change the parameter of listen_ipv6 to NO (this is the need to pay attention Yes, this problem will occur if listen and listen_ipv6 are YES at the same time). **

**We can customize a ftp directory, here I created the ftpserver/ftp folder under home, here I use ftpserver as the ftp server directory, and then modify the ftp folder permissions to allow users to read and write in ftp Operation. **

sudo mkdir -p ftpserver/ftp/
chmod 777 ftp

**Then we go to modify the configuration file, here I am going to modify the configuration file in a way that allows anonymous access. **

anonymous_enable=YES              #Allow anonymous access
anon_root=/home/charles/ftpserver #Here is the directory of your ftp, here I use anonymous access, so it is anon_root
local_root=/home/charles/ftpserver #Here is the directory accessed by ordinary users
no_anon_password=YES              #Anonymous users do not need to enter a password
write_enable=YES                  #Can write to it
anon_upload_enable=YES            #Allow anonymous upload
anon_mkdir_write_enable=YES       #Allow anonymous creation of folders

**Remember to restart the service after saving: service vsftpd restart, and then we can access the server through ftp+ip. The following is an anonymous example for access and upload and download operations. We created a test folder in the home directory, then touched a file in this folder, then touched a file b in the ftp folder, and then accessed the ftp server in the test folder. **

**In the ftp folder, we can download files from the server through get and upload files through put. Take the above example as an example, put a and get b. Then exit through commands such as quit or exit or bye. Then the final result is shown below: **

**The above is the simple operation of ftp. For uninstalling the ftp server, use the following command, --purge is used to completely delete related files. **

sudo apt-get remove --purge vsftpd

Recommended Posts

Ubuntu install ftp server and possible problems
Install Gnome and VNC on Ubuntu Server
ubuntu install nginx server
Deploy FTP server under ubuntu
Install OpenSSL 1.0.2 on Ubuntu Server 14.04
Ubuntu 16.04 compile and install PHP 7.2
ubuntu18.04 compile and install python3.8
ubuntu install and configure GitLab
Ubuntu16.04 install SVN and configuration
Ubuntu16.04 install and uninstall VMware-Workstation 14
Install and configure Mono production environment on Ubuntu Server
Install Chef server workstation on Ubuntu 18.04
Install and configure Docker in Ubuntu
Install and deploy Gerrit under Ubuntu
Install nodejs and npm under Ubuntu 16.04
CentOS7 install and use SQL Server
Install Ubuntu 18.04 server with kvm virtualization
Compile and install QEMU under Ubuntu
Windows Ubuntu subsystem ssh and ftp
Install Oracle 11gR2 on Ubuntu Server 12.4.0
How to install Bacula Server on Ubuntu 14.04
[Daily] Win10 open and install ubuntu subsystem
Ubuntu install Elasticsearch and elasticsearch-analysis-ik word segmentation
Install docker on ubuntu and basic usage
Ubuntu18.04 Server version installation and use (graphic)
Ubuntu 18.04 source code compile and install ffmpeg4.1
Ubuntu install PHP and PHP Nginx configuration method
Install and uninstall CUDA and CUDNN on Ubuntu
Install jetty in Ubuntu 18.04 Server, non-apt version
Linux install Docker and run Ubuntu system
DLNA/UPnP Server installation and configuration under Ubuntu 12.04
How to install Ubuntu20.04 and install NVIDIA driver
How to install Zabbix on Ubuntu 16.04 Server
How to install Pycharm and Ipython on Ubuntu 16.04/18.04
How to install and configure NATS on Ubuntu 16.04
Install JDK and configure environment variables on Ubuntu 16.04
ubuntu18.04 install python2
ubuntu18.04 install docker
How to install and secure phpMyAdmin on Ubuntu 16.04
How to install and configure ownCloud on Ubuntu 16.04
How to install and configure ownCloud on Ubuntu 16.04
ubuntu12.04 install python3
Install and use Git and GitHub on Ubuntu Linux
How to install and configure GitLab on Ubuntu 18.04
How to install python in ubuntu server environment
How to install and configure Ansible on Ubuntu 18.04
ubuntu install nodejs
ubuntu 16 install asp.net
How to install and use Curl on Ubuntu 18.04
How to install and use Composer on Ubuntu 18.04
ubuntu install leanote
How to install and use Wine on Ubuntu 18.04
How to install and configure Elasticsearch on Ubuntu 16.04
Simple and clean install remote login for ubuntu18
How to install and use Composer on Ubuntu 20.04
How to install and configure VNC on Ubuntu 18.04
How to install and configure Sphinx on Ubuntu 16.04
How to install and configure OrientDB on Ubuntu 14.04
How to install and use PostgreSQL on Ubuntu 16.04
docker install ubuntu
ubuntu install elasticsearch