How to configure an FTP server

Configure FTP server

FTP is a file transfer protocol for two-way transfer of control files on the Internet. To transfer files between the local computer and the cloud server through FTP, you must first configure FTP on the server.

The following takes Windows server 2008 as an example to configure the FTP of the server:

 

Part 1: Windows System

1. Install FTP server

Connect to the instance through the console, find and click "Server Management" through "Start" - "Administrative Tools" - "Server Management"

Right-click the server manager to find "Add role" and click (if no role is added, it may be that the server manager has not been fully read, just wait for a while)

Click Next to start configuration:

Check "Web Server (IIS)" and click Next:

Check "FTP Server", select all the secondary menus, and click Next:

Confirm the installation information and click Install:

After a while, it will show that the installation is successful, just close the window:

2. Add FTP site and authorization

Through "Start" - "Administrative Tools" - "Internet Information Services (IIS)", find and click "Internet Information Services (IIS)":

First left-click to select the user name, then right-click to find "Add FTP site" and click (if not, the FTP installation will fail, please return to step 1 to configure):

Enter an FTP site name, add a physical path to it, and click Next:

P address selection: all unassigned, the port is port 21 (default), SSL selects "None", click Next:

Select "Basic" for authentication, "All users" for authorization, select read and write for permissions (you can choose authorization according to your needs), and click Finish to complete the FTP configuration (if it pops up: This website does not exist, please Refresh the website list. You can click the "+" sign of the website on the left menu bar)

 

Part 2: Linux System

1. Install ftp service

command line input

yum install -y vsftpd

After the installation is complete, start the FTP service:

service vsftpd start

chkconfig --level vsftpd 
chkconfig --level 2345 vsftpd on

 

2. Configure permissions

(1) Anonymous user login Anonymous user login login name: ftp (anonymous) password empty login directory is /var/ftp Confirm that anonymous users can upload, download, create, delete permissions, restart the FTP service: Enter yum -y install vim to install vim run:

#vim  /etc/vsftpd/vsftpd.conf
anon_upload_enable=YES         上传 
anon_mkdir_write_enable=YES    创建 
anon_other_write_enable=YES    删除 
#service vsftpd restart

If anonymous users can be banned for security reasons, create system users yourself, just change the anonymous login to "NO"

#vim  /etc/vsftpd/vsftpd.conf  
anonymous_enable=NO 

(2) Create a system user to log in to FTP and run:

useradd -s /sbin/nologin kec
passwd kec

 

That is, create an account called "kec", change the password and confirm.

 

Part 3: My Top Article Recommendations

Part 4: My Video Article Recommendations

Guess you like

Origin blog.csdn.net/suny2020/article/details/88784999