我在配置 proftpd 以允许系统用户访问 centos 机器上的 /var/www/ 时遇到问题。
配置文件
ServerName "ProFTPD server"
ServerIdent on "FTP Server ready."
ServerAdmin root@localhost
ServerType standalone
DefaultServer on
VRootEngine on
#DefaultRoot ~ !adm
DefaultRoot /var/www/
VRootAlias /etc/security/pam_env.conf etc/security/pam_env.conf
AuthPAMConfig proftpd
AuthOrder mod_auth_pam.c* mod_auth_unix.c
#PersistentPasswd off
UseReverseDNS off
User nobody
Group nobody
MaxInstances 20
UseSendfile off
LogFormat default "%h %l %u %t \"%r\" %s %b"
LogFormat auth "%v [%P] %h %t \"%r\" %s"
<Global>
Umask 022
AllowOverwrite yes
<Limit ALL SITE_CHMOD>
AllowAll
</Limit>
</Global>
<Limit LOGIN>
AllowUser …Run Code Online (Sandbox Code Playgroud) 我已经安装了带有 Apache、Sendmail 和 Proftpd 的 CentOS 6。当我试图开始任何事情时,我的意思是任何事情,它需要 10 秒。
发邮件?通过 PHP 的 mail() 发送一些东西需要 10 秒。
专业版?通过“等待欢迎消息”部分需要 10 秒钟。
SSH?服务器让我输入密码需要 10 秒,我需要额外的 10 秒才能登录。
所有这些问题都发生在第一次加载时,如果我通过 mail() 发送电子邮件,发送它需要 10 秒钟,但第二次发送时,几乎立即就可以了。Proftpd 也一样。
到底是怎么回事?
我正在使用 ProFTPD 运行 Ubuntu Server 9.10,而且我也有 Webmin。
我有 3 个域的 DNS 设置、3 个域的邮件设置以及这些域的 Apache2 设置。他们工作得很好。
现在我想为传入的用户提供 FTP 访问权限,但将它们指向 /var/www/[domain] 并让它们作为用户“ftpuser”之类的东西进入,但希望将其转换为用户“www-data”,以便网络权限将是正确的。
有什么技术可以做到这一点?
我的 ProFTPD 服务器有问题。
当我尝试使用 TLS 连接到服务器时,我在 MLSD 命令后超时。它仅在我使用 TLS 时发生 - 没有它它可以完美运行。
我检查了这些日志:
proftpd.log - 用户 xxx:登录成功。
tls.log - 接受 TLSv1/SSLv3 连接...保护设置为私有
请问哪里有问题?我可以提供更多信息,请在评论中询问。
编辑:今天我试图将 iptables 的 INPUT 策略设置为 ALLOW ......一切正常......所以问题是防火墙。我应该如何设置 iptables 以与 FTPS 一起使用?
这是我的 iptables 设置:
*filter
:INPUT DROP [930:61159]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [256:26448]
-A INPUT ! -i eth0 -j ACCEPT
-A INPUT -p tcp -m tcp --tcp-flags ACK ACK -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type …Run Code Online (Sandbox Code Playgroud) 无论出于何种原因,我都无法通过 FTP 客户端或命令行连接/登录到我的 FTP 服务器。我正在使用 Webmin 和 ProFTPd。我已经设置了一个用户,使用简单的密码作为 ftp 组的一部分,并使用 /sbin/nologin 作为 shell 路径。日志仅显示“FTP 连接已打开”和“FTP 连接已关闭”。我指定的被动端口在防火墙上打开。
好像密码不正确,但确实如此。这是我的 proftpd.conf 文件:
# This is the ProFTPD configuration file
# $Id: proftpd.conf,v 1.1 2004/02/26 17:54:30 thias Exp $
DefaultRoot ~
ServerName "ProFTPD server"
ServerIdent on "FTP Server ready."
ServerAdmin root@localhost
ServerType standalone
#ServerType inetd
DefaultServer off
AccessGrantMsg "User %u logged in."
#DisplayConnect /etc/ftpissue
#DisplayLogin /etc/ftpmotd
#DisplayGoAway /etc/ftpgoaway
DeferWelcome off
# Use this to excude users from the chroot
DefaultRoot ~ !adm
# Use …Run Code Online (Sandbox Code Playgroud) 如何防止写入和删除~/site/backups/ProFTPD 配置中的目录?
到目前为止:我想我已经想出了如何禁用任何类型的删除:
<Directory ~/site/backups>
<Limit DELE>
DenyAll
</Limit>
<Limit RMD>
DenyAll
</Limit>
</Directory>
Run Code Online (Sandbox Code Playgroud)
如果有更好的防弹方法来禁用删除以及一些关于如何防止编辑/写入的示例。
编辑:
请注意,我不能简单地使用权限,因为我使用所有者和组以高级方式计算配额。此外,允许通过面板进行编辑和删除,该面板以用户身份运行。但是,我不希望他们能够通过 FTP 执行此操作。