Linux FTP Server Setup

Source: Internet
Author: User
Tags anonymous ftp ftp client file transfer protocol linux

Overview

Using File Transfer Protocol (FTP) to transfer files between computers over a network is a common method. Almost all platforms have FTP client and server software, so using FTP to transfer files is also a convenient way.

There are many different ways to configure an FTP server. One is to configure FTP as a private server that is open only to users in the system, which is also the default configuration for FTP. A private FTP server only runs user access on the system and can access controls on users, giving or denying access to specific users.

The other is to configure the FTP server as an anonymous server. An anonymous FTP server allows anyone (regardless of an account number) to access the server and transfer files. Because of potential security concerns, you must be careful to configure to allow access only to specific directories on your system. In this section, we configure FTP to be "chrooted", a configuration that runs user access, such as a Web site's directory, but does not allow them to access a higher level of directories.

Attention matters

All of the commands below are UNIX-compliant commands.

The source path is "/var/tmp" (of course, you can use a different path in fact).

Installed in the Redhat Linux 6.1 test pass.

To install with the "root" user.

The WU-FTP version number is 2.6.0.

Compiling and installing

To decompress a package (tar.gz):

[root@deep]# CP Wu-ftpd-version.tar.gz/var/tmp
[root@deep]# cd/var/tmp
[root@deep]# tar xzpf wu-ftpd-version.tar.gz

Compiling and optimizing

Go to WU-FTPD's new directory and run the following command:

Edit the "ftpcount.c" file (vi +241 src/ftpcount.c) to change the following line:

#if defined (LINUX)

To

#if defined (LINUX_BUT_NOT_REDHAT_6_0)

Edit the "pathnames.h.in" file (vi +42 src/pathnames.h.in) to change the following line:

#define _path_execpath "/bin/ftp-exec"

To

#define _path_execpath "/usr/bin/ftp-exec"

We change "ftp-exec" from "/bin" directory to "/usr/bin" directory.

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.