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 build vsftpd and realize virtual users

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

Share

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

This article focuses on "how to build vsftpd and achieve virtual users", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to build vsftpd and realize virtual users.

Build vsftpd and realize virtual users

Install vsftpd

Yum install-y vsftpd

Configure vsftpd

(1) create a user database file

[root@localhost /] # vim / etc/vsftpd/vusers.txtwangwangpassdb_load-T-t hash-f vusers.txt vusers.dbchmod 600 vusers.db

(2) create users and access FTP directories

[root@localhost /] useradd-d / var/ftproot-s / sbin/nologin vuser [root@localhost /] chmod a=rx / var/ftproot/ [root@localhost /] chmod-w / var/ftproot/ [root@localhost /] mkdir / var/ftproot/upload [root@localhost /] setfacl-m u:vuser:rwx / var/ftproot/upload

(3) create a pam configuration file

[root@localhost /] # vim / etc/pam.d/vsftpd.db auth required pam_userdb.so db=/etc/vsftpd/vusersaccount required pam_userdb.so db=/etc/vsftpd/vusers

(4) specify pam configuration file

Vim / etc/vsftpd/vsftpd.confguest_enable=YESguest_username=vuserpam_service_name=vsftpd.db

(5) Virtual users establish independent configuration files.

Mdkir / etc/vsftpd/vusers.d/vim / etc/vsftpd/vsftpd.confuser_config_dir=/etc/vsftpd/vusers.d/cd / etc/vsftpd/vusers.d/vim wanganon_upload_enable=YESanon_mkdir_write_enable=YESanon_other_write_enable=YES

(6) start the service

Systemctl start vsftpd

At this point, I believe you have a deeper understanding of "how to build vsftpd and achieve virtual users". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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: 0

*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