In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "vsftpd service configuration under linux". In daily operation, I believe many people have doubts about vsftpd service configuration under linux. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "vsftpd service configuration under linux". Next, please follow the editor to study!
Install the vsftpd service
Rpm-qa | grep vsftp
Yum install-y vsftpd
Edit vsftpd service profile
Vi / etc/vsftpd/vsftpd.conf
[root@rac1 vsftpd] # grep-v "^ #" / etc/vsftpd/vsftpd.conf
Anonymous_enable=YES allows anonymous account login
Local_enable=YES allows local users to log in to ftp
Write_enable=YES allows writing
Local_umask=022 default permission 644
Dirmessage_enable=YES allows errors to be printed to message log
Xferlog_enable=YES
Connect_from_port_20=YES
Xferlog_std_format=YES
Listen=YES
# # Local user access
Local_root=/tmp/public home directory location
Local_max_rate=0 limits the maximum transmission rate
Chroot_local_user=yes restricts users from switching directories
Chroot_list_enable=yes opens the list of user directories
Chroot_list_file=/etc/vsftpd/chroot_list user directory restrictions users who write files in this file can change directories at will, other users are limited to the user's home directory, and the whitelist controls the
# # enabling Virtual users
Pam_service_name=vsftpd password Authentication pam File
Tcp_wrappers=YES supports wrapers
User_config_dir=/etc/vsftpd/vusers_dir # specifies the directory where the virtual user profile is saved
Guest_enable=YES enables virtual users to map local users
Guest_username=vuser maps local users
# # user access Control
Restrict access to specified users, while other users can access:
Userlist_enable=YES
Userlist_deny=YES
Userlist_file=/etc/vsftpd.user_list
Restrict that specified users can access the ftp server, while other users cannot: (recommended)
Userlist_enable=YES
Userlist_deny=NO
Userlist_file=/etc/vsftpd.user_list
Listen_address=192.168.0.55
Listen_port=21 designated listening port
Download_enable=ye
Max_clients=0-number of concurrent client connections
Max_per_ip=0-maximum number of connections per client
Idle_session_timeout=600-Idle timeout
Pasv_enable=yes
Pasv_min_port=24500
Pasv_max_port=24600
The home directory of the anonymous anonymous account is / var/ftp/
# Virtual user access login configuration steps
Vi / etc/vsftpd/vuser.txt
Aa user name
Aa password
Yum-y install db4-utils
Db_load-T-t hash-f / etc/vsftpd/vuser.txt / etc/vsftpd/vuser.db
Vi / etc/pam.d/vsftp
Auth required / lib/security/pam_userdb.so db=/etc/vsftpd/vuser
Account required / lib/security/pam_userdb.so db=/etc/vsftpd/vuser
Comment out all other lines (in fact, local user login is disabled)
Only virtual users can log in
Restart the vsftpd service
Service vsftpd restart
Create a locally mapped user
Useradd-d / home/vftproot-s / sbin/nologin vuser
Chmod 755 / home/vftproot
Vi / etc/vsftpd/vsftpd.conf
Guest_enable=YES
Guest_username=vuser
Pam_service_name=vsftpd
Restart the vsftpd service
Service vsftpd restart
User_config_dir=/etc/vsftpd/vusers_dir # specifies the directory where the virtual user profile is saved
Virtual user profile (the file name is named by the virtual user name and the virtual user is aa)
Vi / etc/vsftpf/vuers_dir/aa
Anon_upload_enable=yes virtual user turns on upload permission
Anon_mkdir_write_enable=yes virtual user enables the creation of write files
Anon_other_write_enable=yes opens files written by other virtual users
Local_root=/tmp/aa virtual file host directory
Mkdir / tmp/aa
Chown vuser / tmp/aa
Ll
Drwxr-xr-x 2 vuser root 4096 Jul 2 08:25 aa
Do not have 777permissions in linux
Log in using the client
Frp 192.168.0.10
Aa
one hundred and twenty three
Ftp ftp address
Ftp >
Ls-View catalog fil
Cd-switch directories (ftp)
Bin-binary transmission
Lcd-switch download directory (local)
Get-download a single file
Mget-download multiple files
Put-upload a single file
Mput-upload multiple files
Prompt-turn off switching mode
Bye-launch
Open-Link to the ftp server
User-enter the user ftp server username and password
Ftp Automation download script
Vi auto_get.sh
Open 192.168.56.11
User ftp 861791911@qq.com
Bin
Prompt
Lcd / backup
Mget *
Bye
Ftp-n
< auto_get.sh >/ dev/null
Note: if selinux is enabled to allow users to upload files to the host directory, execute the command
Setsebool-P ftp_home_dir 1
Setsebool-P allow_ftpd_full_access 1
Nmap Port scanning tool
Nmap 192.168.56.11
Nmap-p1-65535 192.168.. 56.11
At this point, the study on "vsftpd service configuration under linux" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.