Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Ubuntu server detailed process of installing proftpd ftp server

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "ubuntu server installation of proftpd ftp server detailed process", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "ubuntu server installation proftpd ftp server detailed process"!

I. installation

The code is as follows:

Sudo apt-get install proftpd

During installation, you will be allowed to choose the running mode: Standalone, the former is a single server mode, and Inetd is a super server mode

I chose Standalone.

II. Configuration

The code is as follows:

Sudo vim / etc/shells

Add the following code

The code is as follows:

/ bin/false

Create a new user ftpuser1 and user group ftp and set the password. This user does not need a valid shell (more secure), so select / bin/false

To fptuser1.

The code is as follows:

Sudo groupadd ftp

Sudo useradd ftpuser1-p pass-g ftp-d / home/ftp-s / bin/false

Create new upload and download directories and modify permissions under the / home/ftp directory

The code is as follows:

Cd / home/ftp

Sudo mkdir download

Sudo mkdir upload

Cd / home

Sudo chmod 755 ftp

Cd / home/ftp

Sudo chmod 755 download

Sudo chmod 777 upload

3. Modify proftpd core configuration file proftpd.conf

The code is as follows:

Sudo vim / etc/proftpd/proftpd.conf

#

# / etc/proftpd/proftpd.conf-This is a basic ProFTPD configuration file.

# To really apply changes reload proftpd after modifications.

#

# Includes DSO modules

Include / etc/proftpd/modules.conf

# Set off to disable IPv6 support which is annoying on IPv4 only boxes.

UseIPv6 off # We don't need IPv6, so off

ServerName "xiaoyigeng's FTP Server" # modify the server name

ServerType standalone # server operation mode. Enter standalone here, or you can choose

Inetd

Whether the welcome message is displayed when DeferWelcome on # users log in

MultilineRFC2228 on

DefaultServer on

ShowSymlinks on

TimeoutNoTransfer 600

TimeoutStalled 600 # can be reduced to 100

TimeoutIdle 1200 # timeout in a daze

DisplayLogin welcome.msg # if the above DeferWelcom is set to on, then display

Content in welcome.msg

DisplayFirstChdir .message # what is displayed when you change the directory

ListOptions "- l"

DenyFilter\ *. * /

# Use this to jail all users in their homes

DefaultRoot / home/ftp # ftp users are restricted to this directory

# Users require a valid shell listed in / etc/shells to login.

# Use this directive to release that constrain.

# RequireValidShell off # anonymous users want to choose on

# Port 21 is the standard FTP port.

Port on which the Port 21 # service is running

# In some cases you have to specify passive ports range to by-pass

# firewall limitations. Ephemeral ports can be used for that, but

# feel free to use a more narrow range.

# PassivePorts 49152 65534 # Port used in PASV mode

# If your host was NATted, this option is useful in order to

# allow passive tranfers to work. You have to use your public

# address and opening the passive ports used on your firewall as well.

# MasqueradeAddress 1.2.3.4

# To prevent DoS attacks, set the maximum number of child processes

# to 30. If you need to allow more than 30 concurrent connections

# at once, simply increase this value. Note that this ONLY works

# in standalone mode, in inetd mode you should use an inetd server

# that allows you to limit maximum number of processes per service

# (such as xinetd)

MaxInstances 30

# Set the user and group that the server normally runs at.

User nobody # server runs under nobody user

The Group nobody # server runs under the nobody group

# Umask 022 is a good standard umask to prevent new files and dirs

# (second parm) from being group and world writable.

Umask 022022 # default permissions for new files

# Normally, we want files to be overwriteable.

AllowOverwrite on # files can be overwritten

# Uncomment this if you are using NIS or LDAP to retrieve passwords:

# PersistentPasswd off

# Be warned: use of this directive impacts CPU average load!

# Uncomment this if you like to see progress and transfer rate with ftpwho

# in downloads. That is not needed for uploads rates.

#

# UseSendFile off

# Choose a SQL backend among MySQL or PostgreSQL.

# Both modules are loaded in default configuration, so you have to specify the backend

# or comment out the unused module in / etc/proftpd/modules.conf.

# Use 'mysql' or' postgres' as possible values.

#

#

# SQLBackend mysql

#

TransferLog / var/log/proftpd/xferlog # transfer file log

SystemLog / var/log/proftpd/proftpd.log # system operation log

TLSEngine off

QuotaEngine on

Ratios on

# Delay engine reduces impact of the so-called Timing Attack described in

# http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02

# It is on by default.

DelayEngine on

ControlsEngine on

ControlsMaxClients 2

ControlsLog / var/log/proftpd/controls.log

ControlsInterval 5

ControlsSocket / var/run/proftpd/proftpd.sock

AdminControlsEngine on

# A basic anonymous configuration, no upload directories.

#

# User ftp

# Group nogroup

# # We want clients to be able to login with "anonymous" as well as "ftp"

# UserAlias anonymous ftp

# # Cosmetic changes, all files belongs to ftp user

# DirFakeUser on ftp

# DirFakeGroup on ftp

#

# RequireValidShell off

#

# # Limit the maximum number of anonymous logins

# MaxClients 10

#

# # We want 'welcome.msg' displayed at login, and' .message 'displayed

# # in each newly chdired directory.

# DisplayLogin welcome.msg

# DisplayFirstChdir .message

#

# # Limit WRITE everywhere in the anonymous chroot

#

#

# DenyAll

#

#

#

# # Uncomment this if you're brave.

# #

# Umask 022 is a good standard umask to prevent new files and dirs

# (second parm) from being group and world writable.

# # Umask 022 022

# #

# # DenyAll

# #

# #

# # AllowAll

# #

# #

#

#

# Valid Logins # the following section is the setting user permissions section

AllowUser ftpuser1

DenyAll

Umask 022 022

AllowOverwrite off

DenyAll

Umask 022 022

AllowOverwrite off

DenyAll

Umask 022 022

AllowOverwrite on

DenyAll

AllowAll

Start, stop and restart the server

The code is as follows:

Sudo / etc/init.d/proftpd start

Sudo / etc/init.d/proftpd stop

Sudo / etc/init.d/proftpd restart

V. maintenance

You can view logs in the / var/log/proftpd directory

View the ftp server load command ftptop

Check what login server ftpwho

Introduction to the use of Limit in PS:proftpd

What we use more may be the use of Limit. Limit has roughly the following actions, which can basically cover all permissions.

CMD:Change Working Directory changes the directory

Permission for MKD:MaKe Directory to establish a directory

RNFR: ReName FRom permission to change directory name

Permission for DELE:DELEte to delete files

RMD:ReMove Directory permission to delete a directory

Permission to download RETR:RETRieve from the server to the client

Permission for STOR:STORe to upload from client to server

READ: readable permissions, excluding permissions for column directories, equivalent to RETR,STAT, etc.

WRITE: permission to write to a file or directory, including MKD and RMD

DIRS: whether to allow column directories, which is equivalent to LIST,NLST and other permissions, is more practical.

ALL: all permissions

LOGIN: permission to log in or not

For the objects applied by the above Limit, it also includes the following scope

AllowUser for the Limit allowed by a user

DenyUser forbids Limit for a user

AllowGroup allowed Limit for a user group

Limit prohibited by DenyGroup for a user group

Limit allowed by AllowAll for all user groups

DenyAll forbids Limit for all users

The parameters for limiting the rate are:

TransferRate STOR | RETR speed (Kbytes/s) user user

Thank you for your reading, these are the contents of "the detailed process of installing proftpd ftp server on ubuntu server". After the study of this article, I believe you have a deeper understanding of the detailed process of installing proftpd ftp server on ubuntu server, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report