In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of how to deploy vsftpd under Linux, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this article on how to deploy vsftpd under Linux. Let's take a look.
Log in to your own linux server to check if vsftps is installed
Rpm-qa | grep vsftpd
After input, there is no information indicating that it is not installed.
1. Install and execute commands:
Yum-y install vsftpd
Default installation path: / etc/vsftpd/vsftpd.conf can be viewed by command: whereis vsftpd
two。 Create a virtual user
Choose to create a ftp folder under the root directory or user directory: mkdir ftpfile
Create a user:
Useradd wanghy-d / home/myForder / / (add a user and create a folder called myforder under the home directory wanghy can be changed to your own FTP account)
If you want to delete a user, you can delete it through the userdel command.
Userdel wanghy
If you want to modify, you can modify it by using usermod wanghy command followed by some options.
Usermod wanghy
Modify myForder permissions (grant permissions to myForder)
Chown-R wanghy / home/myForder / / format is chown-R username file path
Reset the ftpuser password:
Passwd wanghy
Next, enter the password you want to set: (need to enter 2 times)
(set to 12345678 here, it is recommended that the password be 8 digits or not.)
5. Due to the need for FTP to support passive mode (PASV), you also need to open a limited range of port permissions such as (8088-8099)
Enter the command:
Vim / etc/vsftpd/vsftpd.conf
Press the I key to enter insert mode and add the following code at the end
Pasv_min_port= 8088 / / Note here is the open range port, which means that all ports within the range of 8088 / 8099 must be open, and the port can be set to pasv_max_port= 8099 at will.
Anonymous_enable defaults to yes and changes it to NO, which means anonymous user access is not supported.
Change to anonymous_enable=NO
Listen is changed from NO to YES by default
Listen=YES
Listen_ IPv6 defaults to YES to NO
Listen_ipv6=NO
After modification, press esc to exit edit input: wq save and exit
Then release the two ports with the command:
/ sbin/iptables-I INPUT-p tcp-- dport 8088-j ACCEPT/sbin/iptables-I INPUT-p tcp-- dport 8099-j ACCEPT
Edit the firewall configuration:
Vim / etc/sysconfig/iptables
Under-An INPUT-p tcp-m state-state NEW-m tcp-dport 22-j ACCEPT, start another line and change the port to 21:
-An INPUT-p tcp-m state-state NEW-m tcp-dport 21-j ACCEPT
Then save and exit via: wq
Enter systemctl restart vsftpd-restart
Other commands
Start vsftpd:
Systemctl start vsftpd
Restart vsftpd:
Systemctl restart vsftpd
Stop vsftpd:
Systemctl stop vsftpd
View vsftpd status:
Systemctl status vsftpd
Edit chroot_list:
Vim / etc/vsftpd/chroot_list
Add the user name: wanghy to the chroot_list (corresponding to the user name wanghy created by useradd wanghy-d / home/ftpfile)
If you modify the file, remember to restart it once.
Systemctl restart vsftpd
At this time, enter ftp://192.168.1.65 (your own public network ip or local ip) in the browser to access it.
To uninstall vsftpd
Rpm-aq vsftpd continues to execute rpm-e vsftpd-3.0.2-25.el7.x86_64
Edit through the vim editor
Vim / usr/local/nginx/conf/nginx.conf
Find and release # user nobody (remove #) at the top of the configuration file and change it to your own user name: user wanghy, and then add the following server node to the configuration http {} (you'd better buy one for your own domain name and put it for the record)
Server {listen 80; charset utf-8; # if this is set to off, if you use the browser to access the domain name, there will be 403 unauthorized access through ip (of course, you can disable ip access). If it is set to off for image servers, etc., the autoindex off; # shows that the file size is probably in kb or MB or GB autoindex_exact_size off. Server_name resource.xxx.com.cn;# domain name had better apply for a location / {root / home/myforder/images/; # you can create a new images directory under myForder add_header Access-Control-Allow-Origin *;}}
After modification, pass the command:
Cd / usr/local/nginx/sbin/./nginx-s reload / / Refresh
It's done.
This is the end of the article on "how to deploy vsftpd under Linux". Thank you for reading! I believe you all have a certain understanding of the knowledge of "how to deploy vsftpd under Linux". If you want to learn more, you are 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: 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.