Vsftpd configuration Manual (2)

Source: Internet
Author: User
Article Title: vsftpd configuration Manual (2 ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Installation

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

This document details how to create, install, and run VSFTPD from the .tar.gz distribution package of vsftpd.

1) Establish VSFTPD

In the directory generated after the file is decompressed. tar.gz. As follows:

Cd vsftpd-2.0.1

Edit "builddefs. h" to perform compile-time settings. (Tcp_wrappers build, etc)

Enter make and press enter (if it does not work, please send me an email.

This will generate a binary file. You can verify it. As follows:

[Chris @ localhost vsftpd] $ ls-l vsftpd

-Rwxrwxr-x 1 chris 61748 Sep 27 vsftpd

2) meet the conditions required for VSFTPD Installation

VSFTPD requires a "nobody" user by default. If this user does not exist, add it. As follows:

[Root @ localhost root] # useradd nobody

Useradd: user nobody exists

By default, VSFTPD requires an empty directory:/usr/share/empty. Add this directory if it does not exist. As follows:

[Root @ localhost root] # mkdir/usr/share/empty/

Mkdir: cannot create directory '/usr/share/empty': File exists

If anonymous users are allowed (anonymous), you will need an "ftp" user and its home directory (this home directory does not belong to the "ftp" user, and "ftp" users do not have the write permission) in your system.

Run the following command to create an "ftp" user if it does not exist.

[Root @ localhost root] # mkdir/var/ftp/

[Root @ localhost root] # useradd-d/var/ftp

(Even if your "ftp" User already exists, it is very helpful to complete the following two steps :)

[Root @ localhost root] # chown root. root/var/ftp

[Root @ localhost root] # chmod og-w/var/ftp

3) install the configuration, execution, and help files of VSFTPD.

After entering "make install", the binary and help files are copied to the appropriate directory.

You can also manually copy these files:

Cp vsftpd/usr/local/sbin/vsftpd

Cp vsftpd. conf.5/usr/local/man/man5

Cp vsftpd.8/usr/local/man/man8

"Make install" does not copy the default configuration file, so we recommend that you manually copy it:

Cp vsftpd. conf/etc

Daidong Note: depending on your system version, it may also be cp vsftpd. conf/etc/vsftpd

4) test (no inetd impact)

VSFTPD can be started in standalone or through inetd (xinetd.

You can use inetd to run vsftpd to better control it. However, we did not do this during the first run to check whether the system is configured properly.

Edit/etc/vsftpd. conf (daidong Note: it may also be/etc/vsftpd. conf) and add the following line at the bottom:

Listen = YES

This tells VSFTPD not to start from inetd.

OK. Now try to start FTP.

Log on as ROOT.

Make sure you have not run other FTP services (otherwise, VSFTPD cannot occupy port 21 required by FTP ).

Run the binary file as follows:

[Root @ localhost root] #/usr/local/sbin/vsftpd &

[1] 2104

If everything is normal, you will be connected to the FTP server as follows:

[Chris @ localhost chris] $ ftp localhost

Connected to localhost (127.0.0.1 ).

220 (vsFTPd 1.1.1)

Name (localhost: chris): ftp

331 Please specify the password.

Password:

230 Login successful. Have fun.

Remote system type is UNIX.

Using binary mode to transfer files.

Ftp> ls

227 Entering Passive Mode (229,133, 0)

150 Here comes the directory listing.

D -- x 2 0 0 4096 Jan 14 2002 bin

D -- x 2 0 0 4096 Apr 21 20:52 etc

Drwxr-xr-x 2 0 0 4096 Apr 21 20:52 lib

Drwxr-sr-x 2 0 50 4096 Jul 26 pub

226 Directory send OK.

Ftp>

[1] [2] [3] [4] Next page

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.