Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install vsftpd in Ubuntu18.04

2025-01-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to install Ubuntu18.04 vsftpd, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Install vsftpd

$sudo apt-get install vsftpd-y

Start the vsftpd service and set it to boot

$sudo systemctl start vsftpd$ sudo systemctl enable vsftpd

Set the directory structure of FTP

Create a user

$sudo adduser testuser1

Create a directory and set ownership

$sudo mkdir / home/testuser1/ftp$ sudo chown nobody:nogroup / home/testuser1/ftp$ sudo chmod Amurw / home/testuser1/ftp

Create a directory where you can upload files, and set ownership for

$sudo mkdir / home/testuser1/ftp/test$ sudo chown testuser1:testuser1 / home/testuser1/ftp/test

Configure vsftpd

Back up the original configuration file of vsftpd

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

Open and edit the vsftpd.conf file

$sudo vi / etc/vsftpd.conf

Add the following to the file

Listen=NOlisten_ipv6=YESanonymous_enable=NOlocal_enable=YESwrite_enable=YESlocal_umask=022dirmessage_enable=YESuse_localtime=YESxferlog_enable=YESconnect_from_port_20=YESchroot_local_user=YESsecure_chroot_dir=/var/run/vsftpd/emptypam_service_name=vsftpdpasv_enable=Yespasv_min_port=10000pasv_max_port=11000user_sub_token=$USERlocal_root=/home/$USER/ftpuserlist_enable=YESuserlist_file=/etc/vsftpduserlist.confuserlist_deny=NO

4. Save and close the configuration file

: wq

5. Add the testuser1 users we created to the user list file in vsftpd

$sudo vi / etc/vsftpduserlist.conf

6. Restart the vsftpd service to apply these changes

$sudo systemctl restart vsftpd

Use SSL/TLS

Create a security certificate

$sudo mkdir / etc/certs$ sudo openssl req-x509-nodes-days 365-newkey rsa:2048\-keyout / etc/certs/vsftpd.pem\-out / etc/certs/vsftpd.pem

Open the vsftpd.conf file

$sudo vi / etc/vsftpd.conf

Add the following to the file

Rsa_cert_file=/etc/certs/vsftpd.pemrsa_private_key_file=/etc/certs/vsftpd.pemssl_enable=YESallow_anon_ssl=NOforce_local_data_ssl=YESforce_local_logins_ssl=YESssl_tlsv1=YESssl_sslv2=NOssl_sslv3=NOrequire_ssl_reuse=NOssl_ciphers=HIGH

Save the file and restart vsftpd

$sudo systemctl restart vsftpd

Log in to the added user using the SFTP protocol on the FTP client

Configure the firewall

The above are all the contents of the article "how to install vsftpd in Ubuntu18.04" above are all the contents of the article "how to install vsftpd in Ubuntu18.04", which is all of the above sudo ufw allow OpenSSH$ sudo ufw allow 20xptpxxxxxxxxxxxxxxxxxxxxxxxxxxx! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 229

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report