Configuration of the FTP server in Ubuntu

Source: Internet
Author: User

The file transfer protocol (FTP) is a TCP protocol used to upload and download files between computers. FTP works in Client/Server mode. The server component is called the FTP daemon. It continuously listens to FTP requests from remote clients. When a request arrives, it manages logon and establishes a connection. During the entire session, it executes any commands sent by the FTP client. You can manage FTP server access in two ways:

O Anonymous

O authorization

In anonymous mode, the remote client can use the Default User Account "anonymous" or "ftp" and send an email address as the password to access the FTP server. In authorization mode, the next user must have an account and a password. The permissions for accessing directories and files on the FTP server are defined based on the account used for logon. In general, the FTP daemon will be hidden in the root directory of the FTP server and changed to the FTP home directory. In this way, other parts of the file system can be hidden from remote calls.

Vsftpd-FTP Server Installation

* Vsftpd is one of the FTP daemon that can be used in Ubuntu. It is very convenient for installation, setup and maintenance. To install vsftpd, run the following command:

Sudo apt-Get install vsftpd

Vsftpd-FTP Server Configuration

* You can edit the vsftpd configuration file/etc/vsftpd. conf to configure the default settings.

Anonymous_enable = yes: whether anonymous FTP is allowed. If not, select No;

Local_enable = yes: whether local user login is allowed;

Local_umask = 022: Set the local user's file mask to the default value 022 and the default value 077;

Anon_upload_enable = yes: whether to allow anonymous File Upload;

Anon_mkdir_write_enable = yes: whether anonymous users are allowed to create directories;

Dirmessage_enable = yes: whether to display the directory description file. The default value is yes, but the. Message file needs to be created manually;

Xferlog_enable = yes: whether to record the FTP Transfer Process;

Connect_from_port_20 = yes: Are you sure the port is transmitted from 20 (ftp-data );

Chown_username = Username: whether to change the owner of the uploaded file. If necessary, enter a system user name to change all uploaded files to the root owner;

Xferlog_file =/var/log/vsftpd. Log: the default path and name of the FTP transfer log is/var/log/vsftpd. log;

Xferlog_std_format = yes: whether to use the standard FTP xferlog mode;

Idle_session_timeout = 600: sets the default disconnection inactive session time;

Data_connection_timeout = 120: sets the data transmission timeout time;

Nopriv_user = ft1_cure: the non-privileged system user required to run vsftpd. The default value is nobody;

Ascii_upload_enable = yes: whether to use ASCII to upload files;

Ascii_download_enable = yes: whether to use ASCII to download files;

Ftpd_banner = welcome to shuke FTP service: customizes welcome information;

Deny_email_enable = yes: whether anonymous users are prohibited from using certain email addresses;

Banned_email_file =/etc/vsftpd. banned_emails: If anonymous users are prohibited from using certain email addresses, enter the path and file name of the banned email address;

Chroot_list_enable = yes: whether to restrict system users to their home directories;

Chroot_list_file =/etc/vsftpd. chroot_list: If the System user is restricted to the home directory, the list of banned users is written;

Max_clients = Number: If the instance is started in standalone mode, only $ number users can connect to the instance. Other users will receive an error message. The default value is 0, which does not limit the number of users;

Message_file: sets the file name of the directory information file obtained when accessing a directory. The default is. Message.

Note that the default settings in the configuration file are mainly for security considerations. Every change above will make the system less secure, so please change them only when you need them.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.