ZhangZhihui's Blog  

vsftpd - FTP Server Installation

vsftpd is an FTP daemon available in Ubuntu. It is easy to install, set up, and maintain. To install vsftpd you can run the following command:

sudo apt install vsftpd

Anonymous FTP Configuration

By default vsftpd is not configured to allow anonymous download. If you wish to enable anonymous download edit /etc/vsftpd.conf by changing:

anonymous_enable=YES

During installation a ftp user is created with a home directory of /srv/ftp. This is the default FTP directory.

If you wish to change this location, to /srv/files/ftp for example, simply create a directory in another location and change the ftp user’s home directory:

sudo mkdir -p /srv/files/ftp
sudo usermod -d /srv/files/ftp ftp 

After making the change restart vsftpd:

sudo systemctl restart vsftpd.service

User Authenticated FTP Configuration

By default vsftpd is configured to authenticate system users and allow them to download files. If you want users to be able to upload files, edit /etc/vsftpd.conf:

write_enable=YES

Now restart vsftpd:

sudo systemctl restart vsftpd.service

Now when system users login to FTP they will start in their home directories where they can download, upload, create directories, etc.

Similarly, by default, anonymous users are not allowed to upload files to FTP server. To change this setting, you should uncomment the following line, and restart vsftpd:

anon_upload_enable=YES

 

Copied from: https://ubuntu.com/server/docs/service-ftp

posted on 2023-06-26 20:59  ZhangZhihuiAAA  阅读(9)  评论(0编辑  收藏  举报