所以昨天我决定停止在我的 CentOS 6 服务器上使用 cPanel,并学习如何使用 LAMP sertup 使用它。
我的基本要求是拥有一个可供我和我的注册用户通过 ftp 访问的 Web 服务器,我使用 atmail 收发邮件,并在另一台服务器上运行 mysql 服务器。
cPanel 在这方面表现得非常好,所以我改用 LAMP。现在我的问题是,我希望能够创建 FTP 用户并将他们锁定在他们的“主”目录中,例如/var/www/html/users/<user>
以下是我已采取的步骤:
1)wget proftpd-1.3.3e.tar.gz(来自 ftp repo)
2)tar zxvf proftpd-1.3.3e.tar.gz
3)cd /proftpd-1.3.3e.tar.gz
4)./configure
5)制作
6)进行安装
我将 /etc/proftpd.conf 编辑为如下内容 7) vi /etc/proftpd.conf
8)默认根
9)用户 nobody
没人组
这就是我所能得到的,我尝试用这个命令创建一个用户
10)groupadd测试
11)useradd -g test1 -p test1 -d /var/www/html/users/ -s /sbin/false 测试
我尝试登录,但 Filezilla 抛出登录不正确错误。
我已看过大概 20 个关于如何设置 ProFTPD 的指南,但我仍然感到困惑,这对我来说只不过是一次学习经历。
有人能否告诉我成功运行 FTP 服务器所需的具体步骤,就像添加 FTP 帐户时设置 cPanel 一样。
编辑:这是我的 proftpd.conf
# 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
# Port 21 is the standard FTP port.
Port 21
# 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 nobody
# 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
# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
DenyAll
</Limit>
# A basic anonymous configuration, no upload directories. If you do not
# want anonymous users, simply delete this entire <Anonymous> section.
#<Anonymous ~ftp>
# User ftp
# Group ftp
# We want clients to be able to login with "anonymous" as well as "ftp"
# UserAlias anonymous ftp
# 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
# DisplayChdir .message
# Limit WRITE everywhere in the anonymous chroot
# <Limit WRITE>
# DenyAll
# </Limit>
#</Anonymous>
答案1
您是否已设置AuthOrder
为?mod_auth_pam.c* mod_auth_unix.c
proftpd.conf
如果还是无法登录,请启用日志:
# Define the log formats
LogFormat default "%h %l %u %t \"%r\" %s %b"
LogFormat auth "%v [%P] %h %t \"%r\" %s"
# Define log-files to use
TransferLog /var/log/proftpd/xferlog
ExtendedLog /var/log/proftpd/access_log WRITE,READ write
ExtendedLog /var/log/proftpd/auth_log AUTH auth
ExtendedLog /var/log/proftpd/paranoid_log ALL default
看看会发生什么。