VPS侦探论坛

 找回密码
 注册
查看: 809|回复: 8

[Pure-Ftpd] lftp上传不到另一个pureftpd服务器上

[复制链接]
发表于 2023-2-20 00:43:26 | 显示全部楼层 |阅读模式

使用脚本备份上传到ftp服务器,可以使用主动模式吗
默认好像被动模式,开放范围端口可以上传,关闭后范围端口就这样了

[root@VM-0-5-centos ~]# /bin/bash /root/backup.sh
Backup website files...
Backup Databases...
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: [Warning] Using a password on the command line interface can be insecure.
Delete old backup files...
Uploading backup files to ftp...
^Ctting directory contents (0) [Making data connection...]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2023-2-20 00:47:19 | 显示全部楼层


使用win端的ftp工具的主动模式21可以访问和上传,是需要设置lftp吗,主动模式
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2023-2-20 08:39:26 | 显示全部楼层

lftp默认是被动模式的
可以在lftp配置文件 /etc/lftp.conf 中加入 set  ftp:passive-mode  no 来使用主动模式
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2023-2-20 11:11:07 | 显示全部楼层



licess 发表于 2023-2-20 08:39
lftp默认是被动模式的
可以在lftp配置文件 /etc/lftp.conf 中加入 set  ftp:passive-mode  no 来使用主动模 ...

在/etc/lftp.conf 加入了 set  ftp:passive-mode  no,还是无效

Uploading backup files to ftp...
^Ctting directory contents (0) [Making data connection...]
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2023-2-20 19:53:28 | 显示全部楼层

wm11261 发表于 2023-2-20 11:11
在/etc/lftp.conf 加入了 set  ftp:passive-mode  no,还是无效

Uploading backup files to ftp...

你lftp是什么版本?
有些lftp版本上参数是 set ftp:passive-mode off
也可以尝试直接加到备份脚本 cd ${FTP_Dir} 这一行的上面,另外就是用主动模式的话也还需要开启 20 端口

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2023-2-20 20:59:37 | 显示全部楼层

licess 发表于 2023-2-20 19:53
你lftp是什么版本?
有些lftp版本上参数是 set ftp:passive-mode off
也可以尝试直接加到备份脚本 cd ${F ...

LFTP | Version 4.4.8

ftp客户端和服务端的防火墙20 21都开了

set ftp:passive-mode off也试了,还是提示^Ctting directory contents (0) [Making data connection...]



补充内容 (2023-2-20 21:01):
从腾讯云的一个服务器的lftp 传到腾讯另一个服务器的pureftp

补充内容 (2023-2-20 21:09):
加到备份脚本 cd ${FTP_Dir} 这一行的上面
也试过这个,提示一样的没变话
发表于 2023-2-21 10:23:23 | 显示全部楼层

wm11261 发表于 2023-2-20 20:59
LFTP | Version 4.4.8

ftp客户端和服务端的防火墙20 21都开了

再加上个 set ftp:ssl-allow false 试试,还不行的话贴出连接同一时间段里pureftpd的日志看一下
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2023-2-21 12:02:50 | 显示全部楼层

licess 发表于 2023-2-21 10:23
再加上个 set ftp:ssl-allow false 试试,还不行的话贴出连接同一时间段里pureftpd的日志看一下 ...

加上set ftp:ssl-allow false也不行。
开始backup脚本后,服务端的日志 /var/log/messages如下:
Feb 21 11:57:01 VM-0-10-centos systemd: Started Session 8 of user root.
Feb 21 11:57:12 VM-0-10-centos pure-ftpd: (w***8@16*.**.**.*24) [INFO] Logout.
Feb 21 11:58:01 VM-0-10-centos systemd: Started Session 9 of user root.
Feb 21 11:58:21 VM-0-10-centos pure-ftpd: (?@16*.**.**.*24) [INFO] New connection from 16*.**.**.*24
Feb 21 11:58:21 VM-0-10-centos pure-ftpd: (?@16*.**.**.*24) [INFO] w***8 is now logged in
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2023-2-22 08:43:45 | 显示全部楼层


wm11261 发表于 2023-2-21 12:02
加上set ftp:ssl-allow false也不行。
开始backup脚本后,服务端的日志 /var/log/messages如下:
Feb 21  ...

看官方文档,可能是 set ftp:prefer-epsv no 这个原因 https://lftp.yar.ru/FAQ.html 如果还不行,按目前信息的话无法判断什么问题

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-5-4 23:29 , Processed in 0.028338 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表