Proftpd configuration learning notes-Linux Enterprise Application-Linux server application information. The following is a detailed description. Previously, vsftpd + mysql was used for ftp. However, vsftpd configuration is relatively weak. The permission Control for virtual users can only be performed through the system's permission Control for directories. Therefore, we plan to use proftpd to configure virtual users.
I have referenced n-plus tutorials over the past few days. However, most of them are based on redhat, and there are few debian-based configurations. It can only be written on one side of research.
1. Installation
In debian, it is very easy to install proftpd.
Apt-get install proftpd
Apt-cache search proftpd * has the following results:
Proftpd-doc-Versatile, virtual-hosting FTP daemon (Documentation)
Proftpd-ldap-Versatile, virtual-hosting FTP daemon (with LDAP support)
Proftpd-mysql-Versatile, virtual-hosting FTP daemon (with SQL support)
Proftpd-pgsql-Versatile, virtual-hosting FTP daemon (with SQL support)
It indicates that the proftpd under debian has different names based on the supported modules. If mysql support is installed, install proftpd-mysql directly. This is different from redhat. You do not need to install various modules during the installation process.
Tags: proftpd virtual user mysql Configuration
For me, because you need to configure proftpd that supports Virtual users, install
Apt-get install proftpd-mysql
In this way, proftpd is installed. The configuration file is/etc/proftpd. conf.
All configurations must be written here.
The following is the default configuration file after installation. It is easy to understand. Configuration method similar to apache
#
#/Etc/proftpd. conf -- This is a basic ProFTPD configuration file.
# To really apply changes reload proftpd after modifications.
#
ServerName "Debian"
ServerType standalone
DeferWelcome off
MultilineRFC2228 on
DefaultServer on
ShowSymlinks on
# Uncomment this if you are using NIS or LDAP to retrieve passwords:
# PersistentPasswd off
# Uncomment this if you wocould use TLS module:
# TLSEngine on
# Uncomment this if you wocould use quota module:
# Quotas on
# Uncomment this if you wocould use ratio module:
# Ratios on
# Port 21 is the standard FTP port.
Port 21
# 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 shoshould 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.
User nobody
Group nogroup
# Umask 022 is a good standard umask to prevent new files and dirs
# (Second parm) from being group and world writable.
Umask 022 022
# Normally, we want files to be overwriteable.
AllowOverwrite 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 off
# 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
##
##
#
#
Modify the original configuration file and perform our own configuration: 0.
By default, proftpd does not record logs, which is unfavorable for our server configuration, because it is not convenient to know the error information. So Add the following two lines at the top
SyslogLevel emerg
SystemLog/ftp/log/proftpd. log # Here is your server log path, modified to your own: from top to bottom, modify
ServerName "Meteor's Ftp"
ServerAdmin sy.meteor@msn.com
MaxInstances 30 # This is the maximum number of connections. if the machine is good enough, you can modify the value below the big point.
User nobody
Group nogroupUser and Group specify the valid user ID when the proftpd process starts. The default identity is nobody for security reasons. One thing to note is that, generally, in Red Linux 9.0, there is no nogroup Group by default. You can specify the Group as nobody.
Umask 022 022 # no modification required
DefaultRoot ~ Only users in their own directories are allowed to write.
AllowRetrieveRestart on
AllowStoreRestart on
# These two statements enable proftpd to support resumable Data Transfer
ServerIdent off
# Disable server information display for security reasons. If it is disabled, the welcome information is not displayed by default. However, you can specify the welcome information in the following settings.
The following is the configuration for the user. For proftpd, it seems that you cannot directly specify the main directory. You must configure it separately. This configuration will be detailed later :)
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