我有一台运行 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 帐户对其进行了测试。
我有 LB 服务器,目前负载平衡 2 台机器作为 apache2“http”和“https”请求作为主/从,
如何使用默认端口“22”向同一两台机器发出相同的服务器负载平衡“sftp”请求?
frontend ft_app
bind 1.1.1.1:80
reqadd X-Forwarded-Proto:\ http
default_backend bk_app
frontend ft_apps
bind 1.1.1.1:443 ssl crt /etc/ssl/certs/bundle.pem ca-file /etc/ssl/certs/cert.cer verify optional
reqadd X-Forwarded-Proto:\ https
default_backend bk_apps
backend bk_app
server server1 2.2.2.2:80 check
server server2 3.3.3.3:80 check backup
backend bk_apps
server servers1 2.2.2.2:443 ssl check verify none
server servers2 3.3.3.3:443 ssl check verify none backup
Run Code Online (Sandbox Code Playgroud) 我正在使用 ProFTPD 运行 Ubuntu Server 9.10,而且我也有 Webmin。
我有 3 个域的 DNS 设置、3 个域的邮件设置以及这些域的 Apache2 设置。他们工作得很好。
现在我想为传入的用户提供 FTP 访问权限,但将它们指向 /var/www/[domain] 并让它们作为用户“ftpuser”之类的东西进入,但希望将其转换为用户“www-data”,以便网络权限将是正确的。
有什么技术可以做到这一点?
我在我的专用服务器上使用 CentOS 5.5 和 Apache Webserver。我的文件夹“/var/www/myWebApp”归apache所有,这样apache就可以读取、写入日志等。
但是现在我想使用非常安全的 FTP (vsftp) 来上传我的新文件。我曾经给每个用户 rwx -Acess 到“/var/www/myWebApp”,但我想这是不安全的方式。
在 CentOS 上,我创建了另一个用户“ftpuser”来上传文件,并将“/var/www/myWebApp”作为其主目录。如何在不给每个用户相同权限的情况下授予他写入“/var/www/myWebApp”的权限?
我正在尝试在 Windows 上使用 Filezilla 连接到运行 vsftpd 2.3.5 的 linux ec2 实例(也尝试过 2.3.2,结果相同)但服务器一直以 500 OOPS 响应:vsf_sysutil_bind,然后出现一个次要错误,具体取决于关于我是使用主动模式还是被动模式(请参阅下面的日志)。
几天前,此设置运行良好。据我所知,服务器的配置没有任何变化,但现在连接后立即被抛出。我已经重新启动了 vsftpd,但还没有重新启动服务器本身。什么可能导致这种行为,为什么会突然出现,我该如何解决?
如果我使用主动模式,客户端日志如下:
...
Response: 230 Login successful.
Command: OPTS UTF8 ON
Response: 200 Always in UTF8 mode.
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/"
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: PORT 192,168,1,101,250,178
Response: 200 PORT command successful. Consider using PASV.
Command: LIST
Response: 500 OOPS: vsf_sysutil_bind
Error: Failed to retrieve directory listing
Response: 500 OOPS: priv_sock_get_cmd …Run Code Online (Sandbox Code Playgroud) 我使用 vsftpd 为 Ubuntu 配置了一个 FTP 服务器。但是,我无法访问服务器。
Status: Connecting to IP
Status: Connection established, waiting for welcome message...
Response: 220 (vsFTPd 2.3.2)
Command: USER userhere
Response: 331 Please specify the password.
Command: PASS ***************
Response: 500 OOPS: could not read chroot() list file:/etc/vsftpd.chroot_list
Error: Critical error
Error: Could not connect to server
Run Code Online (Sandbox Code Playgroud)
编辑
问题解决了!注释该行chroot_list_enable=YES
我正在安装一个新服务器,当它突然停止工作时,我一直在调整我的 vsftpd 设置。我注意到服务 vsftpd 只有在vsftpd.conf为空或被删除时才有效。所以我决定使用apt-get remove vsftpdand重新安装 vsftpd ,apt-get install vsftpd但是vsftpd.conf我之前删除的文件因为我想重新开始配置而一直丢失。
如何重新安装 vsftpd 以便找回我的 vsftpd.conf 文件?
我正在尝试以编程方式设置 vpn 应推送到客户端的路由,其中主要的路由之一是 VPC 网络。有没有办法从我的 vpn 实例中获取 VPC CIDR 块?
我正在尝试为我的网站设置 SSL 证书。但是我的网站this site can't be reached在 Chrome 中响应。
在证书管理器中,它显示我的证书的关联资源是我的 ELB。ELB 设置为 HTTPS,端口 443。其目标组是 HTTP,端口 80。该站点在浏览 http/80 时正常工作。我在想我的设置意味着用户点击 HTTPS ELB,然后 ELB 将使用端口 80 为我的网站提供服务。
httpstat https://www.ereverse.com 输出:
> curl -w <output-format> -D <tempfile> -o <tempfile> -s -S ereverse.com curl error: curl: (7) Failed to connect to www.ereverse.com port 443: Connection refused
Run Code Online (Sandbox Code Playgroud)
我还应该注意到我的应用程序是通过 docker 运行的,它正在运行,-p 80:5000并且Dockerfilehas EXPOSE 80 443。
我收到unable to get local issuer certificate了accounts.google.com超过SSL。我从https://curl.haxx.se/ca/cacert.pem下载了一个更新的 CA 文件并openssl s_client用于渲染:
? ~ openssl s_client -connect accounts.google.com:443 -CAfile ~/certs/cacert.pem
CONNECTED(00000003)
depth=2 /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
verify error:num=20:unable to get local issuer certificate
verify return:0
---
Certificate chain
0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=accounts.google.com
i:/C=US/O=Google Inc/CN=Google Internet Authority G2
1 s:/C=US/O=Google Inc/CN=Google Internet Authority G2
i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
2 s:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIEoTCCA4mgAwIBAgIIZMJyEcZ8LIAwDQYJKoZIhvcNAQELBQAwSTELMAkGA1UE
BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl
cm5ldCBBdXRob3JpdHkgRzIwHhcNMTcwMzE2MDkxNjU0WhcNMTcwNjA4MDg1NDAw
WjBtMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN …Run Code Online (Sandbox Code Playgroud) 我安装了 vsftp,然后设置配置文件如下:
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
chroot_local_user=NO
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
xferlog_file=/var/log/vsftpd.log
anon_root=/var/ftp
local_root=~
Run Code Online (Sandbox Code Playgroud)
在 /etc/vsftpd.chroot_list 中,我添加了允许登录的用户。
然后重启服务:
service vsftpd restart
然后当我尝试登录时,出现此错误:
ftp> open 127.0.0.1
连接到 127.0.0.1。
500 OOPS:孩子死了
我用谷歌搜索,但未能找到答案。
请帮忙,谢谢!
ftp ×7
vsftpd ×6
centos ×2
ssl ×2
ubuntu ×2
amazon-ec2 ×1
amazon-elb ×1
amazon-vpc ×1
apt ×1
chroot ×1
haproxy ×1
linux ×1
openssl ×1
permissions ×1
proftpd ×1
redhat ×1
sftp ×1
ubuntu-14.04 ×1
ubuntu-9.10 ×1