Full tutorial on opening an FTP server in ubuntu

Source: Internet
Author: User
Apt-getinstallvsftpd, apt-getinstallproftpd, or apt-getinstallpureftpd refer to the following: Set vsftpd to modify the IP address and edit the/etc/network/interfaces file. Use sudovi/etc/network/interfaces to modify the IP address. # Thisfiledesc

Apt-get install vsftpd

Or

Apt-get install proftpd

Or

Apt-get install pureftpd

Refer to the following: Set vsftpd

Modify IP Address

Edit the/etc/network/interfaces file and use sudo vi/etc/network/I

Nterfaces: Modify the IP address.

# This file describes the network interfaces available on your system

# And how to activate them. For more information, see interfaces (5 ).

# The loopback network interface

Auto lo

Iface lo inet loopback

# This is a list of hotpluggable network interfaces.

# They will be activated automatically by the hotplug subsystem.

Mapping hotplug

Script grep

Map eth0

# The primary network interface

Auto eth0

Iface eth0 inet static

Address 202.38 .??.??

Netmask 255.255.255.0

Network 202.38 .??.??

Broadcast 202.38 .??.??

Gateway 202.38 .??.??

Edit the/etc/hosts file and add the new IP address. Use sudo vi/etc/hosts

127.0.0.1 localhost. localdomain localhost userftp

202.38 .??.?? ???. Ustc.edu.cn userftp

# The following lines are desirable for IPv6 capable hosts

: 1 ip6-localhost ip6-loopback

Fe00: 0 ip6-localnet

Ip6-mcastprefix ff00: 0

Ff02: 1 ip6-allnodes

Ff02: 2 ip6-allrouters

Ff02: 3 ip6-allhosts

Edit/etc/hostname. The content is changed ???. Ustc.edu.cn

/Etc/init. d/networking restart the network.

Install SSH

Apt-get install ssh openssh-server

Now you can use other computers

Ssh ** @ 202.38 .??.??

To remotely manage the server.

Install vsftp

Apt-get install vsftpd

Configure/etc/vsftpd. conf

The following is my vsftpd. conf content

========================================================== ======================================

# The server runs in standalong mode, so that the following control can be performed

Listen = YES

# Accepting Anonymous Users

Anonymous_enable = YES

# Do not ask for a password when an anonymous user logs in

No_anon_password = YES

# Accept local users

Local_enable = YES

# Upload allowed (Global Control). If you want anonymous users to upload data, you need to set anon_upload_enable = YES,

# If you want anonymous users to create directories, you need to set anon_mkdir_write_enable = YES. Deny is disabled here.

# Upload by name, so do not set these two items.

Write_enable = YES

# Umask for local user to upload files

Local_umask = 022

# If it is set to YES, anonymous logon users are allowed to upload directories. Of course, anonymous users must have

# Write permission of the upper-level directory.

Anon_upload_enable = YES

# Define the username for anonymous login. The default value is ftp.

Ftp_username = ftp

# If it is set to YES, anonymous logon users are allowed to add directories. Of course, anonymous users must have upper-Layer

# Directory write permission.

Anon_mkdir_write_enable = YES

# If YES, the text file specified by the message_file option in this directory is displayed when you enter the directory (. messa by default)

Ge) Content

Dirmessage_enable = YES

# The directory where the local user login is located. If this item is not set, the local user login will be located in his home directory

# (The sixth field of/etc/passwd). The option for anonymous users is anon_root.

# Local_root =/home

Anon_root =/home/ftp/

# Use upload/download logs. The default log file is/var/log/vsftpd. log, which can be selected through xferlog_file

Item Modification

Xferlog_enable = YES

# Make sure PORT transfer connections originate from port 20 (ftp-data ).

Connect_from_port_20 = YES

# Use standard xferlog format for logs

Xferlog_std_format = YES

# You may change the default value for timing out a data connection.

Data _ connection_timeout = 120

# Disable local user chroot ()

Chroot_local_user = NO

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.