AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[ftp](server)

Martin Hope
jsx97
Asked: 2024-08-06 00:35:17 +0800 CST

FTP:它的用途、为什么它的 URL 有时以“http://”开头以及它的现代替代品

  • 5

这里有三个问题。

如果我理解正确的话,FTP URL 语法以以下内容开头ftp://:

ftp://[user[:password]@]host[:port]/[url-path]

但是,如果我打开GNU Emacs 下载页面并单击那里的“主 FTP 服务器”链接,这将打开http://ftp.gnu.org/gnu/emacs以http://而不是开头的 URL ftp://。为什么会这样?

第二个问题:使用 FTP 的目的是什么?如果我有一个网站,我想共享一些文件,但我不想或没有时间为此创建 HTML 页面,我只需将它们上传到某个地方,就行了https://my.blog/uploads,不是吗?

有没有现代的“主流” FTP 替代品?

ftp
  • 2 个回答
  • 34 Views
Martin Hope
jupiterbjy
Asked: 2024-01-31 01:04:49 +0800 CST

SFTP 如何比 FTPS 快 4 倍的可能解释?

  • 5

问题

  • iperf3 报告942Mbps
  • SFTP 1GB 传输速度为94~100 MB/s
  • 显式 FTPS 1GB 传输速度为19~23 MB/s
  • CPU / IO 负载均低于 20%htop

我在 google 中找到的近 99% 的帖子都说 FTP(无论加密与否)总是比 SFTP 更快,而且我也认为这是合理的。

在过去的几年里,我花了很多天来配置和摸索为什么 FTPS 没有使用完整的带宽,并最终尝试了 SFTP。然后发现,利用几乎全带宽,速度是原来的 4 倍。

是否有任何可能的解释或 vsftpd 配置错误导致 FTPS 比 SFTP 慢?

--

再次澄清一下意图,从现在开始我完全可以使用SFTP。我已经筋疲力尽,没有时间去摆弄 FTPS。SFTP 对我来说完美无缺,因此我不会再尝试使用 FTPS。

我只是很好奇,为什么大多数教程和帖子都说 FTPS 比 SFTP 更快,但我们在这里看到的情况恰恰相反,这肯定是有原因的。


配置

跳过详细的服务器/客户端硬件信息,因为 iperf3 和 SFTP 已经证明这不是服务器/客户端性能问题。

  • 1 个具有2Gbit/s HW NAT的家庭路由器

    • iptime a2003ns-mu(使用RTL8197F)
  • vsftpd 服务器位于路由器后面,链路速度为 1G

    • Debian 12.2.0-14
    • 华擎 J4105m
    • vsftpd 3.0.3
  • 客户端 PC 在路由器后面,链路速度为 1G

    • Win11教育版
    • FileZilla 3.66.4
  • 在 FTP 上使用 TLSv1.2 进行外部连接


情况

  • 从本地网络访问 FTP 服务器的文件

vsftpd 配置

# General
pam_service_name=vsftpd
utf8_filesystem=YES
dirmessage_enable=YES
xferlog_enable=YES


# Connectivity
listen=YES
listen_ipv6=NO
connect_from_port_20=YES


# Security
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022


# chroot
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
allow_writeable_chroot=YES


# Certs
rsa_cert_file=/etc/letsencrypt/live/[REDACTED]/fullchain.pem
rsa_private_key_file=/etc/letsencrypt/live/[REDACTED]/privkey.pem


# Explicit SSL
ssl_enable=YES
force_local_logins_ssl=YES
force_local_data_ssl=YES
allow_anon_ssl=NO
require_ssl_reuse=NO
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
ssl_ciphers=HIGH


# Passive mode
pasv_addr_resolve=YES
pasv_address=[REDACTED].com
pasv_enable=YES
pasv_min_port=12000
pasv_max_port=13000


# Preventing error using local address connection
pasv_promiscuous=yes

速度数据

[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   113 MBytes   950 Mbits/sec    0    218 KBytes
[  5]   1.00-2.00   sec   112 MBytes   942 Mbits/sec    0    218 KBytes
[  5]   2.00-3.00   sec   112 MBytes   938 Mbits/sec    0    218 KBytes
[  5]   3.00-4.00   sec   112 MBytes   942 Mbits/sec    0    218 KBytes
[  5]   4.00-5.00   sec   112 MBytes   942 Mbits/sec    0    218 KBytes
[  5]   5.00-6.00   sec   112 MBytes   941 Mbits/sec    0    218 KBytes
[  5]   6.00-7.00   sec   113 MBytes   944 Mbits/sec    0    218 KBytes
[  5]   7.00-8.00   sec   112 MBytes   940 Mbits/sec    0    218 KBytes
[  5]   8.00-9.00   sec   112 MBytes   942 Mbits/sec    0    218 KBytes
[  5]   9.00-10.00  sec   112 MBytes   942 Mbits/sec    0    218 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.10 GBytes   942 Mbits/sec    0             sender
[  5]   0.00-10.00  sec  1.10 GBytes   941 Mbits/sec                  receiver

ftp
  • 1 个回答
  • 77 Views
Martin Hope
vrao
Asked: 2024-01-19 13:11:19 +0800 CST

Curl ftp 错误无法解析主机

  • 5

我正在尝试使用curl 通过 ftp 从 Ubuntu 服务器连接到合作伙伴站点。命令由业务伙伴发出

curl -v -kG --ftp-method nocwd --ftp-ssl -cert "domainname.crt" --key "domainname.key" -u user:password ftp://ftp.partner.biz/

我收到以下错误。

* Could not resolve host: domainname.crt
* Closing connection 0
curl: (6) Could not resolve host: domainname.crt
*   Trying <ipaddr>:21...
* TCP_NODELAY set
* Connected to ftp.partner.biz (<ipaddr>) port 21 (#1)
< 220 (<partnername>)
> AUTH SSL
< 504 unknown security mechanism
> AUTH TLS
< 234 AUTH TLS OK starting TLS negotiation
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Request CERT (13):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Certificate (11):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS alert, handshake failure (552):
* error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure
* Closing connection 1

我看到端口 22 和 443 正在我的服务器上侦听

tcp6       0      0 :::22                   :::*                    LISTEN      1570/sshd: /usr/sbi
tcp6       0      0 :::443                  :::*                    LISTEN      5802/apache2 

合作伙伴说他们这边没有错误日志。是不是跟tcp6有关系还是别的什么。我无法更改命令格式,因为合作伙伴说它可以与他们的其他客户一起使用。我很无奈。有人可以告诉我出了什么问题吗?

ftp
  • 2 个回答
  • 30 Views
Martin Hope
ICIM
Asked: 2023-10-06 15:16:30 +0800 CST

rsync 无法将文件写入它创建的文件夹

  • 5

正如标题所示,Rsync 无法将文件复制到 Rsync 本身几秒前创建的文件夹中。curlftpfs我认为这可能是安装 ftp 文件夹的问题。


我尝试在包含带点名称的文件夹内创建一个文件,就像我可以创建它daily.0一样。touch /mnt/ftp/.../daily.0/test.txt

当我使用编辑器时,会出现nano以下消息[ Error writing lock file /mnt/ftp/.../daily.0/.test.txt.swp: Operation not supported ],但它会创建它。vi如果我使用像终端一样的编辑器就会冻结。

如果我创建文件夹、复制或移动文件,就没有问题。


我给你留下一些额外的信息:

卷曲文件系统

curlftpfs -o utf8 -o allow_other ${FTP_USER}:${FTP_PASSWD}@${FTP_HOST} /mnt/ftp -v; grep -qs '/mnt/ftp ' /proc/mounts

它使用 rsync 3.1.2 和 3.2.7 进行测试。我也尝试过仅使用 rsync,但它也无法创建文件。

rsnapshot(rsnapshot_ftp.conf 的一部分)

rsync_long_args --delete --delete-excluded --no-owner --no-group --no-perms --no-times --modify-window=3602
backup  /persistence/backups/tmp/               ./

输出到 rsnapshot: /usr/bin/rsnapshot -c /etc/rsnapshot_ftp.conf daily;

require Lchown
Lchown module loaded successfully
Setting locale to POSIX "C"
echo 6659 > /var/run/rsnapshot.pid
mkdir -m 0700 -p /mnt/ftp/...
...
mkdir -m 0755 -p /mnt/ftp/.../daily.0/
/usr/bin/rsync -av --delete /persistence/backups/tmp/ /mnt/ftp/.../daily.0/./
rsync: mkstemp "/mnt/ftp/.../daily.0/.backup_to_ftp.tar.lmLoNR" failed: Operation not supported (95)
rsync: mkstemp "/mnt/ftp/.../daily.0/.backup2_to_ftp.tar.lmJrSC" failed: Operation not supported (95)

sent 604,429,298 bytes  received 2,640 bytes  172,694,839.43 bytes/sec
total size is 604,280,067  speedup is 1.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1205) [sender=3.1.3]
WARNING: Some files and/or directories in /persistence/backups/tmp/ only transferred partially during rsync operation
/usr/bin/logger -p user.err -t rsnapshot[6659] WARNING: Some files and/or \
    directories in /persistence/backups/tmp/ only transferred partially \
    during rsync operation
touch /mnt/ftp/.../daily.0/
rm -f /var/run/rsnapshot.pid
/usr/bin/logger -p user.err -t rsnapshot[6659] WARNING: /usr/bin/rsnapshot \
    -c /etc/rsnapshot_ftp.conf daily: completed, but with some warnings

与 rsnapshot 执行的操作相同,但在 rsync 命令中 (+/-):

mkdir -m 0755 -p /mnt/ftp/.../daily.0/

/usr/local/bin/rsync -va --delete --numeric-ids --delete-excluded /persistence/backups/tmp/ /mnt/ftp/.../daily.0/./

...
rsync: [receiver] mkstemp "/mnt/ftp/.../daily.0/.backup_to_ftp.tar.1HGJ8m" failed: Operation not supported (95)```
...
sent 603,661,017 bytes  received 393 bytes  241,464,564.00 bytes/sec
total size is 603,512,067  speedup is 1.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1336) [sender=3.2.7]

欢迎任何帮助!

我花了很多时间,我开始认为rsyncinext4无法处理curlftpfs...NTFS请随意留下关于如何在不使用 rsync 的情况下执行 rsnapshot 等操作的意见

ftp
  • 1 个回答
  • 43 Views
Martin Hope
Raul Chiarella
Asked: 2023-07-01 03:09:44 +0800 CST

纯 FTP 服务器让我从“Bind Mounted HTML”文件夹下载文件,但在上传 Index.html 时会向 STOR 命令抛出 533 错误

  • 6

昨天我使用 Pure-FTPd 完成了 FTP 服务器的配置。我使用的方法是“虚拟用户”方法。

下面的命令基本上是我为了使其工作而执行的命令:

PureFTPd (Debian 10)

Instalar FTP usando o Pure-FTPd no Debian 10:

sudo apt install -y pure-ftpd-common pure-ftpd # Install Pure-FTPd
sudo ss -lnpt | grep pure-ftpd # Check what port is Pure-FTPd is running

Initial Steps for Preparing Pure-FTPd to work:

System User and Group:

sudo su -
groupadd ftpgroup  # Create FTP Group
useradd -g ftpgroup -d /dev/null -s /etc ftpuser  # Create Emulated System User for Virtual FTP User
mkdir /home/ftpusers  # Create Base Home dir for Virtual Users

chown root:root /home/ftpusers -R  # Set root Permissions so Pure-FTPd can create folders Automatically
chgrp ftpgroup /home/ftpusers  # Set permissions to FTP Group for Virtual Users Permissions
chmod g+rx /home/ftpusers

PureFTPd Config


echo "yes" > /etc/pure-ftpd/conf/Daemonize  # Run as Daemon
echo "yes" > /etc/pure-ftpd/conf/NoAnonymous  # Prohibit Anonymous
echo "yes" > /etc/pure-ftpd/conf/ChrootEveryone  # Enable chroot
echo “yes” > /etc/pure-ftpd/conf/VerboseLog  # Enable Verbose Logging
echo yes > /etc/pure-ftpd/conf/CreateHomeDir  # Create Folders Automatically
echo no > /etc/pure-ftpd/conf/PAMAuthentication  # ??? Check Later
echo no > /etc/pure-ftpd/conf/UnixAuthentication  # ??? Check Later - Disable login, maybe?

>/var/log/pure-ftpd/transfer.log && chmod 755 /var/log/pure-ftpd/transfer.log  # Enable Logging

Config. Pure-FTPd => /etc/pure-ftpd/pure-ftpd.conf

# This limits accounts to only what is in the Pure-FTPd database
AUTH="-lpuredb:/etc/pure-ftpd/pureftpd.pdb"

# Disallow anonymous connections. Only accept authenticated users.
NoAnonymous                  yes

# File creation mask. <umask for files>:<umask for dirs> - Use 177:077 if you’re paranoid.
Umask                        003:002

# Enable Passive mode to avoid Firewall NAT problems.
PassivePortRange 40000 60000

Config. Common Pure-FTPd => vi /etc/default/pure-ftpd-common

id -u ftpuser # Get UID/GID of FTP User first.
Change UPLOADUID/UPLOADGID on pure-ftpd-common file.

Those commands are needed for some reason, otherwise, user can’t login:
ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/40PureDB
ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/50pure

Virtual User PureFTPd

pure-pw useradd victor -u ftpuser -g ftpgroup -d /home/ftpusers/victor
pure-pw passwd victor -m

Reload PureFTPd
pure-pw mkdb -f /etc/pure-ftpd/pureftpd.passwd -F /etc/pure-ftpd/pureftpd.pdb  # Update PureFTPd Database
service pure-ftpd restart

但是,在此之后,我的下一个需求是从 NGINX 安装中创建一个 HTML 文件夹,供客户端通过 FTP 传输文件。按照上面的命令,以及他的 Chrooted FTP 文件夹 - 一切正常!如果我尝试使用 MobaXTerm 或其他 FTP 客户端将任何内容上传到他的 FTP 文件夹,我可以做到。

但是,如果我尝试将其上传到我使用以下命令创建的 HTML 绑定文件夹,它不会让我这样做:

CHRoot HTML Folder

mkdir -p /home/ftpusers/victor/sites  # Create Websites Folder for Victor
mount --bind /var/www/html /home/ftpusers/victor/sites  # Bind Mount because Link command does not work

Config. for FSTab in order to mount it at boot:

/mnt/data/html /var/www/html none nofail,bind 0 0
/var/www/html /home/ftpusers/victor/sites none nofail,bind 0 0
groups www-data  # Check what groups NGINX user is in
chown -R :<group> /var/www/html  # Just to be sure let’s redo HTML Permission for NGINX.
chmod -R g+w /var/www/html  # Group can Edit/Write

usermod -a -G www-data ftpuser  # Add our FTP User to NGINX Group
groups ftpuser # Now FTP User is in the same groups as NGINX User

Read and Write tests for FTP using cURL => All Tests worked when the owners were ftpuser  ftpgroup.

When Owners were www-data www-data it does not let my FTP User replace and upload files... Even tho, I added the FTP User above as being in the group that is owning the files.

curl ftp://localhost:21/testfile_read -u 'victor:ftp_password' -O  # Read Permissions from Outside HTML folder
curl ftp://localhost:21/sites/testfile_html_read -u 'victor:ftp_password' -O  # Read Permissions from Inside HTML folder.

curl -T testfile_write ftp://localhost:21/ -u 'victor:ftp_password'  # Write Permissions from Outside HTML folder.
curl -T testfile_html_write ftp://localhost:21/sites/ -u 'victor:ftp_password' # Write Permissions from Inside HTML folder.

权限 MobaXTerm 的权限

所以,看起来这是 www-data 和绑定文件夹本身的权限问题...但它没有意义,因为我将 FTP 用户添加到已经可以编辑/写入的组中...?

我快疯了,请问有人可以帮助我吗?

TL;DR:我需要帮助,允许 FTP 用户读取和写入其 chroot FTP 文件夹中的绑定 HTML 文件夹。目前,即使我将 FTP 用户添加到 www-data 组,我在尝试将文件上传到绑定的 HTML 文件夹时仍收到 553 错误(权限被拒绝)。

总之,我想为 FTP 用户提供访问和修改绑定的 HTML 文件夹所需的权限。尽管将用户添加到 www-data 组,但在尝试将文件上传到该文件夹​​时遇到 553 错误。任何帮助将不胜感激。

ftp
  • 1 个回答
  • 17 Views
Martin Hope
stefanu
Asked: 2023-04-19 20:43:58 +0800 CST

用于内容分发的 FTP 服务器

  • 6

我需要设置一个 FTP 服务器,用于将软件包的各种版本分发给多个用户帐户。

为了避免将文件复制到每个用户的 ftp 主文件夹,我想使用类似这样的结构设置一个带有符号链接的“共享文件环境”:

/
...
+-- srv
    +-- ftp
        +-- data
            +-- V1
                +-- Latest            -> /srv/ftp/data/V1/V1.3
                +-- V1.1
                +-- V1.2
                +-- V1.3
            +-- V2
                +-- Latest            -> /srv/ftp/data/V2/V2.2
                +-- V2.1
                +-- V2.2
            +-- V3
                +-- Latest            -> /srv/ftp/data/V3/V3.1
                +-- V3.1
        +-- users
            +-- user1
                +-- V3                -> /srv/ftp/data/V3/Latest
            +-- user2
                +-- V2                -> /srv/ftp/data/V2/Latest
            +-- user3

每个版本都是一个包含多个文件和子文件夹的文件夹。

我正在使用带有 vsftpd 的 linux box(CentOS 7);当我试图限制用户访问他的主文件夹时,我的问题就来了;服务器将不允许访问用户文件夹之外的链接。

例如,我希望 user1 只看到 V3 文件夹及其内容(带有子文件夹)

所以问题是:这是正确的方法吗?如果是,如何让它工作,如果不是,对于这样的事情推荐的方法是什么?

ftp
  • 1 个回答
  • 28 Views
Martin Hope
Вукашин Лекић
Asked: 2022-01-31 07:31:47 +0800 CST

22 端口被封锁,但仍有 ftp 的 root 访问权限

  • 0

最近我用 ufw 搞砸了 22 端口,但我仍然有 sftp 的 root 访问权限。我尝试编辑/etc/ufw/ufw.conf和设置ENABLED=no,但即使重新启动后我仍然无法连接。有什么建议吗?我也知道端口 25566 已打开,我可以以某种方式将 ssh 更改为该端口吗?

我也用腻子得到了这个:

错误

更新:我使用端口 2226(sftp 端口)登录 ssh 并禁用了 ufw。我仍然无法使用端口 22 登录

看起来问题不在 ufw 中,也看起来没有服务在端口 22 上运行,有什么建议吗? 截屏

ftp ssh ufw
  • 1 个回答
  • 118 Views
Martin Hope
cornuz
Asked: 2021-12-21 07:52:47 +0800 CST

rclone 在请求 UTF8 后退出 FTP 服务器

  • 1

我需要以编程方式从 FTP 服务器复制数据rclone。配置很简单:

[exampleftp]
type = ftp
host = ftp.example.com
user = myuser
pass = mypass

如果我尝试复制任何内容,我会得到:

Failed to create file system for "exampleftp:/": NewFs: failed to make FTP connection to "ftp.example.com:21": UTF8 support on

转储协议交换显示:

$ rclone --config=rclone.conf ls exampleftp: -vv --dump bodies

DEBUG : Using config file from "rclone.conf"
DEBUG : rclone: Version "v1.55.1-DEV" starting with parameters ["rclone" "--config=rclone.conf" "ls" "exampleftp:" "-vv" "--dump" "bodies"]
DEBUG : Creating backend with remote "exampleftp:"
DEBUG : ftp://ftp.example.com:21: Connecting to FTP server
DEBUG : FTP Rx: "220 Welcome to the example FTP Server."
DEBUG : FTP Tx: "USER myuser"
DEBUG : FTP Rx: "331 User myuser, password please"
DEBUG : FTP Tx: PASS *****
DEBUG : FTP Rx: "230 Password Ok, User logged in"
DEBUG : FTP Tx: "FEAT"
DEBUG : FTP Rx: "211- Additional features supported include:"
DEBUG : FTP Rx: " MDTM"
DEBUG : FTP Rx: " MFCT"
DEBUG : FTP Rx: " MFMT"
DEBUG : FTP Rx: " SIZE"
DEBUG : FTP Rx: " REST STREAM"
DEBUG : FTP Rx: " AUTH TLS"
DEBUG : FTP Rx: " AUTH SSL"
DEBUG : FTP Rx: " PBSZ"
DEBUG : FTP Rx: " EPRT"
DEBUG : FTP Rx: " EPSV"
DEBUG : FTP Rx: " XCRC"
DEBUG : FTP Rx: " XSHA1"
DEBUG : FTP Rx: " XSHA256"
DEBUG : FTP Rx: " XSHA512"
DEBUG : FTP Rx: " XMD5"
DEBUG : FTP Rx: " HASH SHA-256;SHA-512;SHA-1*;MD5"
DEBUG : FTP Rx: " PROT"
DEBUG : FTP Rx: " LANG EN*"
DEBUG : FTP Rx: " SITE PSWD"
DEBUG : FTP Rx: " SITE ZONE"
DEBUG : FTP Rx: " SITE UTIME"
DEBUG : FTP Rx: " MODE Z ZLIB(LEVEL)"
DEBUG : FTP Rx: " MLST Type*;Size*;Modify*;Create*;"
DEBUG : FTP Rx: " CLNT"
DEBUG : FTP Rx: " CSID"
DEBUG : FTP Rx: " RMDA"
DEBUG : FTP Rx: " UTF8"
DEBUG : FTP Rx: "211 End"
DEBUG : FTP Tx: "TYPE I"
DEBUG : FTP Rx: "200 Type Binary"
DEBUG : FTP Tx: "OPTS UTF8 ON"
DEBUG : FTP Rx: "220 UTF8 support on"
DEBUG : FTP Tx: "QUIT"
Failed to create file system for "exampleftp:": NewFs: failed to make FTP connection to "ftp.example.com:21": UTF8 support on

对我来说,这似乎是在说:

  • 服务器:“我支持 UTF8”
  • 客户:“很好,那么请使用 UTF8”
  • 服务员:“好的,就在这里”
  • 客户:“呃,我得走了。再见。”

其他客户端一切正常,例如lftp. 但是更喜欢使用rclone,因为这将是为 . 预配置的框架的一部分rclone。

有谁知道发生了什么以及任何解决方法?

ftp
  • 0 个回答
  • 119 Views
Martin Hope
Hooman Bahreini
Asked: 2021-12-07 15:00:59 +0800 CST

同一服务器能否同时接受显式和隐式 FTPS?

  • 0

我在 Ubuntu 服务器上使用 VSFTPD。

我有 2 个客户端想要连接到这个 FTP 服务器,其中一个使用带有显式身份验证的 FTPS,另一个客户端使用带有隐式身份验证的 FTPS。

无论如何可以配置 VSFTPD,以接受隐式和显式身份验证?

这是我的 /etc/vsftpd.conf:

listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=NO
# pasv_address=13.55.13.221 
idle_session_timeout=1200
data_connection_timeout=3600
accept_timeout=500
connect_timeout=5000
allow_writeable_chroot=YES
chroot_local_user=YES
user_sub_token=$USER
local_root=/home/$USER/uploads
pasv_enable=YES
pasv_min_port=40000
pasv_max_port=50000
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
require_ssl_reuse=NO
ssl_ciphers=HIGH
utf8_filesystem=YES
ftp vsftpd ftps
  • 1 个回答
  • 243 Views
Martin Hope
Hooman Bahreini
Asked: 2021-11-25 21:56:56 +0800 CST

FTPS 错误:Winsock 错误 10060

  • 0

我已经使用 vsftps 在 ubuntu 上设置了一个 FTPS 服务器

以下是 FTP 配置:sudo vim /etc/vsftpd.conf

listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=NO
# pasv_address=13.55.13.221 
idle_session_timeout=1200
data_connection_timeout=3600
accept_timeout=500
connect_timeout=5000
allow_writeable_chroot=YES
chroot_local_user=YES
user_sub_token=$USER
local_root=/home/$USER/uploads
pasv_enable=YES
pasv_min_port=40000
pasv_max_port=50000
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
require_ssl_reuse=NO
ssl_ciphers=HIGH
utf8_filesystem=YES

我使用 Core FTP LE 测试服务器,我有三个选项:

  1. AUTH SSL <-- 工作正常 在此处输入图像描述

  1. 身份验证 TLS <-- 工作正常 在此处输入图像描述

  1. FTPS (SSL Direct) <-- 不工作 在此处输入图像描述

这是我得到的错误:

SSL/TLS 错误 - 0,SSL 错误 - 1,错误:00000001:lib(0):func(0):reason(1) Winsock 错误 10060(连接尝试失败,因为连接方在一段时间后没有正确响应时间,或建立连接失败,因为连接的主机未能响应。) SSL 连接未建立

知道如何使 FTPS 选项正常工作吗?

ftp ssl ftps openssl
  • 1 个回答
  • 170 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve