我在 CentOS 5.5 中的两台服务器上安装了 vsFTPd ,并将此规则添加到它们的iptables:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
Run Code Online (Sandbox Code Playgroud)
看起来这还不够,因为当我尝试将文件从一台服务器上传到另一台服务器时,我得到了以下结果(IP 地址被屏蔽):
# ftp 99.99.99.99
Connected to 99.99.99.99 (99.99.99.99).
220 (vsFTPd 2.0.5)
Name (99.99.99.99:root): vinny
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (99,99,99,99,107,74)
ftp: connect: No route to host
Run Code Online (Sandbox Code Playgroud)
我在网上找到了几篇关于我必须添加到的第二条规则的文章iptables,但我没有找到正确的语法。能否请你帮忙?
附:我默认安装了 vsFTPd /etc/vsftpd/vsftpd.conf,如果可能的话,我不想更改它的配置文件 ( …
是否可以使用 Proftpd 隐藏目录?
特别是 .svn 目录。
有HideFiles但没有HideDirectories指令。HideFiles 的问题在于它与完整路径不匹配。
<Directory /home/ftp_user/my_project >
# Despite trying to hide this directory it still shows up
# as /.svn in the ftp client.
HideFiles "^\.svn"
<Limit ALL>
allowuser ftp_user
</Limit>
</Directory>
Run Code Online (Sandbox Code Playgroud)
还有另一种隐藏目录的方法吗?
vsftpd 的文档非常好(https://security.appspot.com/vsftpd/vsftpd_conf.html),但是我找不到有关如何使用公钥身份验证的一些详细信息。我知道我需要 require_cert 和validate_cert,但是我应该把可以用于身份验证的公共客户端密钥放在哪里?我找不到这方面的信息。
当我尝试跑步时,我开始收到此消息 vsftpd
500 oops bad bool value in config file for anonymous_enable
Run Code Online (Sandbox Code Playgroud)
vsftpd.conf文件中的相关部分:
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
local_enable=YES
Run Code Online (Sandbox Code Playgroud)
当我评论anonymous_enable=YES,然后我在以下行中遇到相同的错误local_enable=YES
500 oops bad bool value in config file for local_enable
Run Code Online (Sandbox Code Playgroud) 我已经创建了一个用户并分配了一个密码和组(新组)。问题是这个用户只有拥有shell才能登录FTP(proftpd)=/bin/bash
如果我将 shell 设置为/bin/falseProftpd 不会让他进入并提供 530 Login 错误响应。
我希望用户能够登录到 FTP 但没有其他访问权限,因此无法通过 SSH 登录。这/etc/proftpd.conf是所有默认值,它是 version 1.3.3e,它是 CentOS 6。
所以现在我正在尝试为 FTP(e)S 配置 vsftpd 服务器。看来我遇到了不同客户的问题。安全 FTPD 对我来说很好用。Filezilla 没有。
Filezilla 的输出
tatus: Connecting to foo:21...
Status: Connection established, waiting for welcome message...
Trace: CFtpControlSocket::OnReceive()
Response: 220 "Welcome to FTP!"
Trace: CFtpControlSocket::SendNextCommand()
Command: AUTH TLS
Trace: CFtpControlSocket::OnReceive()
Response: 234 Proceed with negotiation.
Status: Initializing TLS...
Trace: CTlsSocket::Handshake()
Trace: CTlsSocket::ContinueHandshake()
Trace: CTlsSocket::OnSend()
Trace: CTlsSocket::OnRead()
Trace: CTlsSocket::ContinueHandshake()
Trace: CTlsSocket::Failure(-12, 53)
Trace: GnuTLS alert 40: Handshake failed
Error: GnuTLS error -12: A TLS fatal alert has been received.
Run Code Online (Sandbox Code Playgroud)
从 vsftpd 粘贴:
# Could be whatever …Run Code Online (Sandbox Code Playgroud) 我有一个网络服务器,我们正在为顾问提供 FTP 访问权限。对于托管在该服务器上的一个域,他需要访问“dev”目录,而对于托管在该服务器上的不同域,他需要访问不同的目录。我正在尝试使用 VirtualHosts 进行设置,但我遇到了问题。这是我的 proftpd.conf 文件的 VirtualHost 位:
<VirtualHost www.example2.com>
ServerName "Example 2"
DefaultRoot /var/www/example2/dev
</VirtualHost>
<VirtualHost www.example1.com>
ServerName "Example 1"
DefaultServer on
DefaultRoot /var/www/example1
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
当我 FTP 到任一域时,我总是得到第一个 VirtualHost,即使我 FTP 到第二个域。
我只是想知道是否有人可以指出我在我们的 CentOS Linux 服务器上配置 Pure-FTP 守护程序的正确方向,以支持通过隐式 SSL/TLS(通过端口 990)的 FTP。顺便说一句,我很擅长在 linux 服务器上找到自己的方法,只是以前从未处理过 Pure-FTP。
谢谢,哈利
PS 我知道显式 FTPS 是新标准,但是,其中一个防火墙似乎与显式 FTPS 混淆,但保留隐式 FTPS 连接。由于我们无法控制防火墙,但可以完全控制服务器,因此只有切换到隐式 FTPS 才能解决此问题。
我在配置 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) 我正在尝试在 RHEL 7.3 上配置 vsftpd 3.0.2。我正在尝试将 my 设置setsebool -P ftp_home_dir=1为允许用户访问他们的主目录。但是我收到:
Boolean ftp_home_dir is not defined
Run Code Online (Sandbox Code Playgroud)
这在查看时确认semanage boolean -l没有ftp_home_dir。
第 14,15 和 16 行声明要检查vsftpd.conf.
# Uncomment this to allow local users to log in.
# When SELinux is enforcing check for SE bool ftp_home_dir
local_enable=YES
/data/ftp/pub/some-dir/ftpuser1...etc
[root@xxxxx ftp]# ls -lZ
drwxr-xr-x. root root unconfined_u:object_r:etc_runtime_t:s0 pub
Run Code Online (Sandbox Code Playgroud)
我相信在解决这个问题时,它也将解决我遇到的 chroot 问题,这是一个完全独立的问题。
提前致谢!
信息:
Red Hat Enterprise Linux Server release 7.3 (Maipo)
uname -a shows: 3.10.0-514.2.2.el7.x86_64 #1 …Run Code Online (Sandbox Code Playgroud)