Use proftpd in ubuntu to build an ftp server

Source: Internet
Author: User
1-use the following command to install proftpd: sudoapt-getinstallproftpd2-Add the following code in etc/shells (sudogedit/etc/shellstoopenthefile) (in command line mode sudovi/etc/shells ): /bin/false create a/home/FTP-shared directory: cd/hom

1-use the following command to install proftpd:

Sudo apt-get install proftpd

2-Add the following code in etc/shells (sudo gedit/etc/shells to open the file) (in command line mode, sudo vi/etc/shells ):

/Bin/false

Create a/home/FTP-shared directory:

Cd/home

Sudo mkdir FTP-shared

Create a userftp user that can only be used to read ftp. this user does not need a valid shell (more secure), so select/bin/false shell to userftp,/home/FTP-shared as the main directory.

To make this part clearer, I will give the command line for this operation:

Sudo useradd userftp-p your_password-d/home/FTP-shared-s/bin/false

Create a download and an upload directory under the FTP-shared directory:

Cd/home/FTP-shared/

Sudo mkdir download

Sudo mkdir upload

Now let's set the corresponding permissions for them:

Cd/home

Sudo chmod 755 FTP-shared

Cd FTP-shared

Sudo chmod 755 downloading

Sudo chmod 777 upload

3-now, go to the proftpd configuration file:

Sudo gedit/etc/proftpd. conf

Of course, you can edit your own proftpd. conf as needed:

# To really apply changes reload proftpd after modifications.

AllowOverwrite on

AuthAliasOnly on

# Choose here the user alias you want !!!!

UserAlias sauron userftp

ServerName "ChezFrodon"

ServerType standalone

DeferWelcome on

MultilineRFC2228 on

DefaultServer on

ShowSymlinks off

TimeoutNoTransfer 600

TimeoutStalled 100

TimeoutIdle 2200

DisplayFirstChdir. message

ListOptions "-l"

RequireValidShell off

TimeoutLogin 20

RootLogin off

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.