linux service of FTP Service article

A, the FTP protocol

FTP server ( File Transfer Protocol Server ) is to provide file storage and computer access services on the Internet, they are in accordance with the FTP service agreement.

The FTP ( File Transfer Protocol ) file transfer protocol

Three versions: 1 , wu-ftp 2 , proftp 3 , vsftpd ( Very Secure ftp daemon very secure ftp service)

Role: commonly used in the web and other cross-server network, cross-platform file transfer (temporary access)

Pros: Simple to use, full-featured, secure, high-speed, stable

Cons: existing version bug

Higher application rates of file transfer: SVN , git

Mode: C / S Mode

Port: 20 data port (data transfer); 21 control port (default) (transmission command)

Second, build a common user sharing mode

Deployment steps:

1 , download and install

# yum -y install vsftpd

2 , configuration (love would suit )

# vim /etc/vsftpd/vsftpd.conf

3 , start

# systemctl start vsftpd

Create a local regular user and password

# useradd USERNAME

# passwd USERNAME

4 , test

A , installation and testing environment ( Linux )

# yum -y install ftp

b , run the test command

# ftp ServerIP

Enter your user name and password

       c , Windows access

                  ftp://ServerIP

                  Enter your user name and password to log in

Note: The test procedures to be performed on the client

Third, to build an open anonymous user mode

Anonymous open mode : is one of the most insecure authentication mode, anyone can verify without a password and log in directly to the FTP server.

1, edit the configuration file

anonymous_enable=YES

2, restart ftp

systemctl restart vsftpd

3, test

A, Linux system

# ftp ServerIP

Username Enter the FTP , the password is blank

       b , Windows systems

              ftp://ServerIP

       / var / ftp / pub anonymous users to access the directory ( NAME = the FTP ) can only watch

              Increase or change the permissions owner

                     777 the CHMOD of / the var / the ftp / designed for pub huo the chown -R the ftp: / the var / the ftp / designed for pub

Fourth, the parameters and their effect profiles

anonymous_enable = YES whether to allow anonymous user login

local_enable = YES whether to allow local users to log

write_enable = YES whether the user has write access

local_umask = 022 local users to upload default permissions

dirmessage_enable = YES whether to use a directory message notification

chroot_local_user = YES limit the user's home directory ( uncommented to) (home directory only allows client access to server-side)

userlist_enable = YES whether to enable the restriction list

/ etc / vsftpd / user_list blacklist, each user occupy his party

anon_upload_enable = YES whether to allow anonymous users to upload, if allowed, you can use the anonymous users to upload files to the pub directory, pay attention to system privileges

anon_mkdir_write_enable = YES whether to allow anonymous users to create a new directory

chown_uploads = YES whether to modify the owner of uploaded files (owner)

chown_username = whoever designated modify the user name of the owner

idle_session_timeout = 600 idle timeout period (in seconds)

data_connection_timeout = 120 wait timeout

ftpd_banner = Welcome to blah FTP service. server login welcome message

Guess you like

Origin www.cnblogs.com/renyz/p/11240438.html