Configuration of ftp server in Ubuntu

Source: Internet
Author: User
Tags file transfer protocol
Setting up an ftp server on your own makes it good. Now, for the linux electives, Mr. Bai asked us to set up three servers as the final score. Oh, you know ~ I. My computer is a Ubuntu12.04 system. I didn't build it in a virtual machine environment. I directly set up a server in the operating system ~ The FTP server is short for FileTransferProtocol (file transfer protocol ;. For Inte

Setting up an ftp server on your own makes it good. Now, for the linux electives, Mr. Bai asked us to set up three servers as the final score. Oh, you know ~

I. My computer is a Ubuntu 12.04 system. I didn't build it in a virtual machine environment. I directly set up a server in the operating system ~

First, let me introduce the FTP server

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 the Internet language, users can upload (download) files to (from) remote hosts through client programs.

(1) Check whether sftpd software is installed

Whether the vsftpd server is installed in ubuntu

# Rpm-qa | grep vsftp

If no information is displayed, it indicates that the server is not installed on your computer.

# Sudo apt-get install vsftpd

The installation will be completed soon

Vsftp uninstallation is also very simple

Use the following command

Sudo apt-get autoremove vsftp

(2) Use of vsftp Software

Start ftp: service vstfpd start

Disable ftp: service vsftpd stop

Restart ftp: service vsftp restart

(3) configure the FTP server

My computer configuration file is in/etc/vsftpd. conf

The FTP server uses/etc/vsftpd. conf as its main configuration file. If the configuration file is changed, the change will take effect after restart.

Below I use the gedit editor to edit the configuration file. Since I used gedit from the very beginning, my teacher has been using vi and I am not very familiar with vi.

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.

Related Article

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.