Install and configure the Linuxftp service and use IE to access Linuxftp
Source: Internet
Author: User
Install and configure the Linuxftp service and use IE to access Linuxftp 1. LinuxFTP installation configuration (1) install FTP: directly use the yum command in Centos to install surootyuminstallftpyuminstallvsftpd (2) configure the FTP service to start the vsftpd service: /sbin/servicevs... install and configure the Linux ftp service and use IE to ACCESS Linux ftp
I. installation and configuration of Linux FTP
(1) install FTP: directly use the yum command to install FTP in Centos
Su root
Yum install ftp
Yum install vsftpd
(2) configure the FTP service
Start vsftpd:/sbin/service vsftpd start
The default Vsftpd server folder is/var/ftp/pub.
The configuration file of the Vsftpd server is/etc/vsftpd. conf.
Add an FTP local user for the FPT logon permission, but do not log on to the local system:
/Usr/sbin/adduser-d/opt/test_ftp-g ftp-s/sbin/nolongin test command means:
Use the command (adduser) to add the test user. you cannot log on to the system (-s/sbin/nologin). your own folder is in (-d/opt/test_ftp )), belong to the group ftp (-g ftp) and then you need to set the password passwd test for it
(3) add firewall rules
Iptables-I INPUT-p tcp -- dport 21-j ACCEPT allows Port 21 to be opened
After the FTP configuration is complete, you can access it through the command line.
II. ACCESS Linux FTP through IE
In many cases, after VSFTPD is installed, most users can log on normally through the command line. However, no logon is found in the browser. This is because VSFTPD does not support passive mode. you can modify the browser settings so that the browser cannot connect in passive mode.
Configuration method:
Method (1): Open the scanner --- tools --- internet options --- advanced remove the "use Passive FTP" item
Method (2): Allow VSFTPD to support passive mode. this method is to modify the FTP server configuration so that the client does not need to change the IE configuration options.
A. First configure the vi/etc/vsftpd. conf file and add
Pasv_enable = YES
Pasvanderbilt max_port = 30100
Pasv_min_port = 30000
(The above 30000--30100 port number can be other ones. here is an example)
B. open firewall configuration:
Vi/etc/sysconfig/iptables add the following two rows
-A RH-Firewall-1-INPUT-p tcp -- dport 30000: 30100-j ACCEPT
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 21-j ACCEPT
C. restart two services:
[Root @ extmail ~] # Service iptables restart
[Root @ extmail ~] # Service vsftpd restart
Other FTP security configurations are attached:
1. to ensure that you can read and write your own directories, you must set it in the configuration file vsftpd. conf to read and write.
Local_enable = yes
Write_enable = yes
Local_umask = 022
2. upload and download anonymously
Modify the configuration file to vsftpd. conf. make sure there are the following lines. you can add them without yourself.
Anonymous_enable = yes
Anon_upload_enable = yes
Anon_mkdir_write_enable = yes
Anon_umask = 022
Then you can create a new folder and change its permissions to fully open. any user can log on to the folder and upload and download files:
Mkdir/var/ftp/guest
Chmod 777/var/ftp/guest
3. customize the welcome information for accessing the FTP server
Set in the vsftpd. conf file:
Dirmessage_enable = yes
Then go to the user directory and create a. message file. enter the Welcome information (Welcome to gxlinux's FTP is written here !) :
[Root @ localhost test_ftp] # ftp 192.168.0.33
Connected to 192.168.0.33 (192.168.0.33 ).
220 (vsFTPd 2.0.5)
Name (192.168.0.33: gxl): test
331 Please specify the password.
Password:
230-Welcome to gxlinux's FTP!
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
4. implement virtual paths
Mount a directory to an FTP server for your use. this is called a virtual path.
For example, mount the gxl user directory to the FTP server for use by FTP server users. run the following command:
[Root @ localhost opt] # mount -- bind/home/gxl/var/ftp/pub # Use the mount command
[Root @ localhost opt] # ls/var/ftp/pub
LumaQQ Screenshot.png desktop
5. enable the log function of vsFTPd
Add the following line to the vsftpd. conf file. Generally, this line exists in the file. you only need to remove the annotator #. if not, add or modify the line:
Xferlog_file =/var/log/vsftpd. log
6. limit the number of links and the maximum number of links for each IP address
Modify the configuration file. for example, vsftp supports a maximum of 100 connections. each IP address supports five links:
Max_client = 100
Max_per = 5
7. limited transmission speed
Modify the configuration file, for example, allow anonymous users and users on vsftd (I .e. virtual users) to download at 80 kB = 1024*80 = 81920
Anon_max_rate = 81920
Local_max_rate = 81920
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.