linux Install Proftpd

linux Install Proftpd

github uri

1
git clone https://github.com/proftpd/proftpd.git

从GitHub下载最新发布的代码

build

1
2
3
4
5
6
7
./configure --prefix=/opt/proftpd --enable-openssl --enable-nls --enable-ctrls --enable-shadow
make
make install

# add virtual user

/opt/proftpd/bin/ftpasswd --file=/opt/proftpd/etc/ftpd.passwd --name=to_zw --home=/home/to_zw --passwd --uid=1000 --gid=1000 --shell=/usr/sbin/nologin

configure

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# This is a basic ProFTPD configuration file (rename it to 
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName "ProFTPD Default Installation"
ServerType standalone
DefaultServer on
DefaultRoot ~

# Port 21 is the standard FTP port.
Port 32121

# Don't use IPv6 support by default.
UseIPv6 off

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022

# 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 under which the server will run.
User nobody
Group nogroup

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~

# Normally, we want files to be overwriteable.
AllowOverwrite on
RequireValidShell off
AuthUserFile /opt/proftpd/etc/ftpd.passwd

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
DenyAll
</Limit>

service

1
sudo vim /etc/systemd/system/proftpd.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[Unit]
Description=Proftpd server
After=network.target remote-fs.target nss-lookup.target

[Service]
User=root
Group=root
Type=forking
WorkingDirectory=/opt/proftpd
ExecStart=/opt/proftpd/sbin/proftpd -c /opt/proftpd/etc/proftpd.conf
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=2
StartLimitInterval=0
RestartPreventExitStatus=SIGKILL

[Install]
WantedBy=multi-user.target
1
2
3
4
5
sudo systemctl daemon-reload
sudo systemct start proftpd.service
sudo systemct enable proftpd.service
sudo systemct restart proftpd.service
sudo systemct stop proftpd.service

注意

虚拟用户向系统文件目录(/home/to_zw )写入时需要系统向目录赋权限,为虚拟用户创建时的uid,gid

1
sudo chown -R 1000:1000 /home/to_zw

linux Install Proftpd
https://jgq12138.github.io/2026/01/09/Linux/linuxInstallProftpd/
作者
JGQ12138
发布于
2026年1月9日
许可协议