我正在尝试在我的 EC2 实例上设置 VSFTPD 被动托管。我浏览了这些说明http://www.synergycode.com/knowledgebase/blog/item/ftp-server-on-amazon-ec2。但是,当我尝试在 FileZilla 中连接时,我得到了
其中目录 /home/lingiii/ftp 设置为用户 lingiii 的 wrx 权限,组开发人员(其中 lingiii 是其中的成员)并且我以用户 lingiii 登录。
有什么建议吗?
我在 CentOS 服务器上安装了 VSFTP 守护程序,使用 RSA 证书使用显式 TLS 登录。现在,我不能上传超过 82k。
如果文件低于该限制,则没有问题。FTP 就像一个魅力。但是一旦 FileZilla 的文件达到 82k(准确地说是 81,952 字节),传输就会停止,并且 FTP 客户端挂起直到超时。
FTP客户端控制台:
15:10:21 Command: STOR jquery-1.7.2.min.js
15:10:21 Response: 150 Ok to send data.
15:11:21 Error: Connection timed out
15:11:21 Error: File transfer failed after transferring 82 KB in 60 seconds
Run Code Online (Sandbox Code Playgroud)
/var/log/vsftpd.log
FTP command: Client "x.x.x.x", "STOR jquery-1.7.2.min.js"
FTP response: Client "x.x.x.x", "150 Ok to send data."
OK UPLOAD: Client "x.x.x.x", "jquery-1.7.2.min.js", 81952 bytes, 1.32Kbyte/sec
FTP response: Client "x.x.x.x", "226 File receive OK." …Run Code Online (Sandbox Code Playgroud) 我正在尝试设置对我的 Apache 服务器的 FTP 访问,但我收到一个530 Login Incorrect错误。
我通过sudo apt-get install vsftpd.
我尝试ftp://(my ip address)与我创建的用户连接,该用户andrew属于ftp用户组。我也试过与root. 我确定密码是正确的。
理想情况下,我希望能够连接到我的/var/www/目录以通过 FTP 客户端上传文件。
这是我的vsftpd.conf文件没有注释的样子:
listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem
Run Code Online (Sandbox Code Playgroud)
并附有评论:
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# …Run Code Online (Sandbox Code Playgroud) 我在 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,如果可能的话,我不想更改它的配置文件 ( …
vsftpd 的文档非常好(https://security.appspot.com/vsftpd/vsftpd_conf.html),但是我找不到有关如何使用公钥身份验证的一些详细信息。我知道我需要 require_cert 和validate_cert,但是我应该把可以用于身份验证的公共客户端密钥放在哪里?我找不到这方面的信息。
我正在使用带有活动 ftp 的 vsftpd。我打开了模块“ip_conntrack_ftp”(在 /etc/sysconfig/iptables-config 中)并且端口 21 已打开。使用 FTP 连接有效,但 FTPS 无效。我可以登录但没有列表:
227 Entering Passive Mode
LIST -a
Run Code Online (Sandbox Code Playgroud)
停止防火墙时它可以工作(我的意思是 ftp 服务器本身上的 iptables)。我在http://www.experts-exchange.com/Software/Server_Software/File_Servers/FTP/Q_22418222.html中读到,无法将 FTPS 与活动 FTP 一起使用。这是真的?
我的 iptables 配置:
*filter
:INPUT DROP [15:2752]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [132:159725]
-A INPUT -i lo -j ACCEPT
-A INPUT -d 127.0.0.0/255.0.0.0 -i ! lo -j REJECT --reject-with icmp-port-unreachable
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A INPUT -p tcp …Run Code Online (Sandbox Code Playgroud) 我在一个盒子上有大约 30 个用户。这些用户处于重叠的组中(大约 6-10 组)。我需要他们在 FTP 进入时能够根据他们的组分配进入特定文件夹。
即,group1 -> /tmp/site1 group2 -> /tmp/site2
在 SuSE 机器上使用 VSFTP 完全可能吗?不幸的是,使用 SFTP 不是一种选择。
谢谢!
编辑:如果用户在多个组中,只需将它们转储到查看他们有权访问的各种文件夹所需的最高级别文件夹。
当我尝试跑步时,我开始收到此消息 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) 我在 vsftpd 中有以下配置
listen_ipv6=YES
allow_writeable_chroot=YES
seccomp_sandbox=NO
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
pasv_enable=YES
pasv_min_port=1024
pasv_max_port=1048
pasv_address=<Elastic ip from amazon aws ec2 instance>
pasv_promiscuous=YES
Run Code Online (Sandbox Code Playgroud)
但是,当尝试使用 FTP 连接到服务器时,我收到以下警告,
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/"
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: PASV
Response: 227 Entering Passive Mode (0,0,0,0,4,1).
Status: Server sent passive reply with unroutable address. Using server address instead.
Command: LIST
Response: 150 Here comes the directory listing.
Response: 226 Directory send OK.
Directory listing of "/" successful …Run Code Online (Sandbox Code Playgroud) 我有一台运行 VSFTPD 的 CentOS 服务器,因此我可以将文件上传到我的站点。
当我连接到 FTP 时,它会列出根目录中的文件夹,我可以打开除名为“public”的文件夹之外的所有文件夹,这只会导致 FileZilla 挂起“150 目录列表来了”。
朋友可以连接到服务器并访问文件夹就好了。
此外,当我访问我提到的其他一些文件夹时,当我尝试下载其中的文件时,它只是在传输时挂起。
我在 vsftpd.conf 中设置了被动模式并打开了如下端口:
pasv_enable=Yes
pasv_max_port=12100
pasv_min_port=12000
pasv_address=<IP ADDRESS>
Run Code Online (Sandbox Code Playgroud)
IP表:
-I INPUT -p tcp --destination-port 12000:12100 -j ACCEPT
Run Code Online (Sandbox Code Playgroud)
我可以连接到其他 FTP 服务器并传输文件就好了,但是我自己的服务器似乎有问题。我还通过多个 FTP 帐户对其进行了测试。