1. the introduction of FTP server is also familiar to everyone. I will take the introduction on Baidu Encyclopedia and discuss the concept with you. FTP is short for FileTransferProtocol (file transfer protocol), and short for Chinese is text transfer protocol. Used...
1. Introduction to FTP servers
You must be familiar with the introduction of ftp. I will take the introduction on Baidu Encyclopedia and discuss the concept with you.
FTP is short for File Transfer Protocol (File Transfer Protocol ". It is used for controlling two-way transmission of files over the Internet. It is also an Application ). There are different FTP applications based on different operating systems, and all these applications comply with the same protocol to transfer files. During FTP usage, users often encounter two concepts: "Download" and "Upload ). "Download" means to copy files from the remote host to your computer. "upload" means to copy files from your computer to the remote host. In Internet language, users can upload (download) files to (from) remote hosts through client programs.
2. set up an FTP server in LINUX
Generally, the default ftp software included in various linux releases is vsftp. from the recognition of vsftp in each linux release, we can see that vsftp should be a good ftp software.
(1) Check whether the vsftpd software is installed
Run the following command to check whether the vsftpd software is installed: rpm-qa | grep vsftpd. for example, the result displayed in my centos 5.6 is as follows:
If no installation is available, you can download and install the software or use the software source. I will not go into details here.
(2) use of vsftpd software
The vsftpd software mainly includes the following commands:
Start ftp: service vsftpd start
Stop ftp: service vsftpd stop
Restart ftp: service vsftpd restart
Or use a command with a path:
(3) vsftpd configuration
There are three ftp configuration files, which are located in the/etc/vsftpd/directory in centos5.6:
Ftpusers: specifies that users cannot access the ftp server.
User_list indicates that the default account cannot access ftp by default.
Main configuration file of vsftpd. conf vsftpd
(4) Use vi to edit the vsftpd. conf file.
User logon control:
Anonymous_enable = YES, allows anonymous users to log on.
No_anon_password = YES. you do not need to enter a password when logging on as an anonymous user.
Local_enable = YES, allow local users to log on.
Deny_email_enable = YES, you can create a file to save the blacklist of some anonymous emails to prevent these people from using Dos attacks.
Banned_email_file =/etc/vsftpd/banned_emails to save the email blacklist Directory (default)
User permission control:
Write_enable = YES, enable global Upload
Local_umask = 022. the umask for local file upload is set to 022, which is the default value.
Anon_upload_enable = YES, which allows anonymous users to upload data. of course, when write_enable = YES. You must also create a directory that allows ftp users to read and write data.
Anon_mkdir_write_enable = YES, allowing anonymous users to create directories with flowers
Chown_uploads = YES. the file owner uploaded by an anonymous user is converted to another user. it is generally recommended to be root.
Chown_username = whoever. change whoever to the owner to be converted. we recommend that you use root
Chroot_list_enable = YES. a list is used to specify which users can only be active in their own directories.
Chroot_list_enable =/etc/vsftpd/chroot_list, specifying the user list file
Nopriv_user = ft1_cure: specifies a security account, allowing ftp to be completely isolated and unprivileged.
Other configurations are not recommended.
User connection and timeout settings:
Idle_session_timeout = 600, default timeout
Data_connection_timeout = 120, set the default data connection timeout time
(4) server logs and welcome information
Dirmessage_enable = YES, which allows displaying information for the configuration Directory
Ftpd_banner = Welcome to blah FTP service. ftp Welcome information
Xferlog_enable = YES enable logging
Xferlog_file =/var/log/xferlog location of the log file
You can change the preceding settings and restart the ftp service to configure ftp.
This article comes from "cloud computing, IT is no longer important ." Blog
PaddingU
? H :?? (? (Ding-bottom: 15px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> 1. FTP server overview
You must be familiar with the introduction of ftp. I will take the introduction on Baidu Encyclopedia and discuss the concept with you.
FTP is short for File Transfer Protocol (File Transfer Protocol ". It is used for controlling two-way transmission of files over the Internet. It is also an Application ). There are different FTP applications based on different operating systems, and all these applications comply with the same protocol to transfer files. During FTP usage, users often encounter two concepts: "Download" and "Upload ). "Download" means to copy files from the remote host to your computer. "upload" means to copy files from your computer to the remote host. In Internet language, users can upload (download) files to (from) remote hosts through client programs.
2. set up an FTP server in LINUX
Generally, the default ftp software included in various linux releases is vsftp. from the recognition of vsftp in each linux release, we can see that vsftp should be a good ftp software.
(1) Check whether the vsftpd software is installed
Run the following command to check whether the vsftpd software is installed: rpm-qa | grep vsftpd. for example, the result displayed in my centos 5.6 is as follows:
If no installation is available, you can download and install the software or use the software source. I will not go into details here.
(2) use of vsftpd software
The vsftpd software mainly includes the following commands:
Start ftp: service vsftpd start
Stop ftp: service vsftpd stop
Restart ftp: service vsftpd restart
Or use a command with a path:
(3) vsftpd configuration
There are three ftp configuration files, which are located in the/etc/vsftpd/directory in centos5.6:
Ftpusers: specifies that users cannot access the ftp server.
User_list indicates that the default account cannot access ftp by default.
Main configuration file of vsftpd. conf vsftpd
(4) Use vi to edit the vsftpd. conf file.
User logon control:
Anonymous_enable = YES, allows anonymous users to log on.
No_anon_password = YES. you do not need to enter a password when logging on as an anonymous user.
Local_enable = YES, allow local users to log on.
Deny_email_enable = YES, you can create a file to save the blacklist of some anonymous emails to prevent these people from using Dos attacks.
Banned_email_file =/etc/vsftpd/banned_emails to save the email blacklist Directory (default)
User permission control:
Write_enable = YES, enable global Upload
Local_umask = 022. the umask for local file upload is set to 022, which is the default value.
Anon_upload_enable = YES, which allows anonymous users to upload data. of course, when write_enable = YES. You must also create a directory that allows ftp users to read and write data.
Anon_mkdir_write_enable = YES, allowing anonymous users to create directories with flowers
Chown_uploads = YES. the file owner uploaded by an anonymous user is converted to another user. it is generally recommended to be root.
Chown_username = whoever. change whoever to the owner to be converted. we recommend that you use root
Chroot_list_enable = YES. a list is used to specify which users can only be active in their own directories.
Chroot_list_enable =/etc/vsftpd/chroot_list, specifying the user list file
Nopriv_user = ft1_cure: specifies a security account, allowing ftp to be completely isolated and unprivileged.
Other configurations are not recommended.
User connection and timeout settings:
Idle_session_timeout = 600, default timeout
Data_connection_timeout = 120, set the default data connection timeout time
(4) server logs and welcome information
Dirmessage_enable = YES, which allows displaying information for the configuration Directory
Ftpd_banner = Welcome to blah FTP service. ftp Welcome information
Xferlog_enable = YES enable logging
Xferlog_file =/var/log/xferlog location of the log file
You can change the preceding settings and restart the ftp service to configure ftp.
This article comes from "cloud computing, IT is no longer important ." Blog