AlistGo / AlistGo/alist

通过sftp挂载alist时无法覆盖文件

Offen
#8,440 16 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Go
Sterne
50.2k
Forks
7.9k
Ø Merge
7 T. 21 Std.
Gemergte PRs (30 T.)
6

Beschreibung

### Please make sure of the following things

- [x] I have read the [documentation](https://alist.nn.ci).
我已经阅读了[文档](https://alist.nn.ci)。

- [x] I'm sure there are no duplicate issues or discussions.
我确定没有重复的issue或讨论。

- [x] I'm sure it's due to `AList` and not something else(such as [Network](https://alist.nn.ci/faq/howto.html#tls-handshake-timeout-read-connection-reset-by-peer-dns-lookup-failed-connect-connection-refused-client-timeout-exceeded-while-awaiting-headers-no-such-host) ,`Dependencies` or `Operational`).
我确定是`AList`的问题,而不是其他原因(例如[网络](https://alist.nn.ci/zh/faq/howto.html#tls-handshake-timeout-read-connection-reset-by-peer-dns-lookup-failed-connect-connection-refused-client-timeout-exceeded-while-awaiting-headers-no-such-host),`依赖`或`操作`)。

- [x] I'm sure this issue is not fixed in the latest version.
我确定这个问题在最新版本中没有被修复。

### AList Version / AList 版本

v3.44.0

### Driver used / 使用的存储驱动

本地存储

### Describe the bug / 问题描述

由于rclone使用webdav进行备份时经常报错,所以我尝试了一下sftp,结果全是报错,问gpt告诉我是权限问题,我自己直接本地挂载也试了下,可以上传 删除 下载,但无法覆盖文件,ftp还没试

### Reproduction / 复现链接

使用sftp挂载,并复制一个文件名相同的文件,会直接报错

### Config / 配置

{
"force": false,
"site_url": "",
"cdn": "",
"jwt_secret": "abab",
"token_expires_in": 48,
"database": {
"type": "sqlite3",
"host": "",
"port": 0,
"user": "",
"password": "",
"name": "",
"db_file": "data/data.db",
"table_prefix": "x_",
"ssl_mode": "",
"dsn": ""
},
"meilisearch": {
"host": "http://localhost:7700",
"api_key": "",
"index_prefix": ""
},
"scheme": {
"address": "0.0.0.0",
"http_port": 5244,
"https_port": -1,
"force_https": false,
"cert_file": "",
"key_file": "",
"unix_file": "",
"unix_file_perm": ""
},
"temp_dir": "data/temp",
"bleve_dir": "data/bleve",
"dist_dir": "",
"log": {
"enable": true,
"name": "data/log/log.log",
"max_size": 50,
"max_backups": 30,
"max_age": 28,
"compress": false
},
"delayed_start": 0,
"max_connections": 0,
"tls_insecure_skip_verify": true,
"tasks": {
"download": {
"workers": 5,
"max_retry": 1,
"task_persistant": false
},
"transfer": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"upload": {
"workers": 5,
"max_retry": 0,
"task_persistant": false
},
"copy": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
}
},
"cors": {
"allow_origins": [
"*"
],
"allow_methods": [
"*"
],
"allow_headers": [
"*"
]
},
"s3": {
"enable": false,
"port": 5246,
"ssl": false
},
"ftp": {
"enable": true,
"listen": ":5221",
"find_pasv_port_attempts": 50,
"active_transfer_port_non_20": false,
"idle_timeout": 900,
"connection_timeout": 30,
"disable_active_mode": false,
"default_transfer_binary": false,
"enable_active_conn_ip_check": true,
"enable_pasv_conn_ip_check": true
},
"sftp": {
"enable": true,
"listen": ":5222"
}
}

![Image](https://github.com/user-attachments/assets/1b2efbdb-e862-49d0-afa8-5442d08c294c)

### Logs / 日志

这个是rclone报错日志,太多了,我就截了一部分,大部分都长这样
> 2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-805824240.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-864685051.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-868701560.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-796145503.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-818240569.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-877801716.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-859842462.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-880775830.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-891856401.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-899899097.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-905241148.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-901693887.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-912515567.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-916321719.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-918054770.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-919399215.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-935136666.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-973967258.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-958424722.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-927309141.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-988925181.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/.outside: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-976028890.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-994767319.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/-992171922.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/101613948.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/1003264479.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/1022323370.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/1030053572.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/1030659148.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/103439458.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/1039179725.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/1075874218.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/1040636649.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)
2025-04-27 02:37:33 ERROR : alist/backup/pic/相册管家/1105195942.jpg: Failed to copy: Put mkParentDir failed: mkdir dirExists failed: dirExists stat failed: sftp: "" (SSH_FX_FAILURE)

这个是alist的日志,我用的是docker部署
> INFO[2025-04-26 18:10:55] reading config file: data/config.json
INFO[2025-04-26 18:10:55] load config from env with prefix:
INFO[2025-04-26 18:10:55] init logrus...
INFO[2025-04-26 18:10:55] init tool 115 Cloud success: ok
WARN[2025-04-26 18:10:55] init tool aria2 failed: failed get aria2 version: Post "http://localhost:6800/jsonrpc": dial tcp [::1]:6800: connect: connection refused
INFO[2025-04-26 18:10:55] init tool SimpleHttp success: ok
INFO[2025-04-26 18:10:55] init tool pikpak success: ok
WARN[2025-04-26 18:10:55] init tool qBittorrent failed: Post "http://localhost:8080/api/v2/auth/login": dial tcp [::1]:8080: connect: connection refused
WARN[2025-04-26 18:10:55] init tool transmission failed: failed get transmission version: can't get session values: 'session-get' rpc method failed: failed to execute HTTP request: Post "http://localhost:9091/transmission/rpc": dial tcp [::1]:9091: connect: connection refused
INFO[2025-04-26 18:10:55] success load storage: [/], driver: [Local], order: [0]
INFO[2025-04-26 18:10:55] success load storage: [/share], driver: [Local], order: [0]
INFO[2025-04-26 18:10:55] start HTTP server @ 0.0.0.0:5244
INFO[2025-04-26 18:10:55] start sftp server on :5222
2025/04/26 18:11:03.294522 WARN RESTY Post "https://openapi.alipan.com/adrive/v1.0/user/getDriveInfo": dial tcp: lookup openapi.alipan.com on 127.0.0.11:53: server misbehaving, Attempt 1
2025/04/26 18:11:11.399479 WARN RESTY Post "https://openapi.alipan.com/adrive/v1.0/user/getDriveInfo": dial tcp: lookup openapi.alipan.com on 127.0.0.11:53: server misbehaving, Attempt 2
2025/04/26 18:11:19.677259 WARN RESTY Post "https://api.nn.ci/alist/ali_open/token": dial tcp: lookup api.nn.ci on 127.0.0.11:53: server misbehaving, Attempt 1
2025/04/26 18:11:27.781268 WARN RESTY Post "https://api.nn.ci/alist/ali_open/token": dial tcp: lookup api.nn.ci on 127.0.0.11:53: server misbehaving, Attempt 2
2025/04/26 18:11:35.936363 WARN RESTY Post "https://api.nn.ci/alist/ali_open/token": dial tcp: lookup api.nn.ci on 127.0.0.11:53: server misbehaving, Attempt 3
2025/04/26 18:11:44.315111 WARN RESTY Post "https://api.nn.ci/alist/ali_open/token": dial tcp: lookup api.nn.ci on 127.0.0.11:53: server misbehaving, Attempt 4
2025/04/26 18:11:44.315172 ERROR RESTY Post "https://api.nn.ci/alist/ali_open/token": dial tcp: lookup api.nn.ci on 127.0.0.11:53: server misbehaving
2025/04/26 18:11:52.318508 WARN RESTY Post "https://api.nn.ci/alist/ali_open/token": dial tcp: lookup api.nn.ci on 127.0.0.11:53: server misbehaving, Attempt 1
2025/04/26 18:12:00.422513 WARN RESTY Post "https://api.nn.ci/alist/ali_open/token": dial tcp: lookup api.nn.ci on 127.0.0.11:53: server misbehaving, Attempt 2
INFO[2025-04-26 18:12:03] [SFTP] swysgh(172.18.0.1:43530) logged in via password
ERRO[2025-04-26 18:12:03] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:12:04] sftpd servechannel failed:EOF
2025/04/26 18:12:08.623243 WARN RESTY Post "https://api.nn.ci/alist/ali_open/token": dial tcp: lookup api.nn.ci on 127.0.0.11:53: server misbehaving, Attempt 3
2025/04/26 18:12:16.949157 WARN RESTY Post "https://api.nn.ci/alist/ali_open/token": dial tcp: lookup api.nn.ci on 127.0.0.11:53: server misbehaving, Attempt 4
2025/04/26 18:12:16.949183 ERROR RESTY Post "https://api.nn.ci/alist/ali_open/token": dial tcp: lookup api.nn.ci on 127.0.0.11:53: server misbehaving
INFO[2025-04-26 18:12:20] Shutdown server...
ERRO[2025-04-26 18:12:20] sftpd server failed:accept tcp [::]:5222: use of closed network connection
FATA[2025-04-26 18:12:20] problem sftp server listening: accept tcp [::]:5222: use of closed network connection
INFO[2025-04-26 18:13:20] reading config file: data/config.json
INFO[2025-04-26 18:13:20] load config from env with prefix:
INFO[2025-04-26 18:13:20] init logrus...
INFO[2025-04-26 18:13:20] init tool SimpleHttp success: ok
INFO[2025-04-26 18:13:20] init tool pikpak success: ok
WARN[2025-04-26 18:13:20] init tool qBittorrent failed: Post "http://localhost:8080/api/v2/auth/login": dial tcp [::1]:8080: connect: connection refused
WARN[2025-04-26 18:13:20] init tool transmission failed: failed get transmission version: can't get session values: 'session-get' rpc method failed: failed to execute HTTP request: Post "http://localhost:9091/transmission/rpc": dial tcp [::1]:9091: connect: connection refused
INFO[2025-04-26 18:13:20] init tool 115 Cloud success: ok
WARN[2025-04-26 18:13:20] init tool aria2 failed: failed get aria2 version: Post "http://localhost:6800/jsonrpc": dial tcp [::1]:6800: connect: connection refused
INFO[2025-04-26 18:13:20] success load storage: [/], driver: [Local], order: [0]
INFO[2025-04-26 18:13:20] success load storage: [/share], driver: [Local], order: [0]
INFO[2025-04-26 18:13:20] start HTTP server @ 0.0.0.0:5244
INFO[2025-04-26 18:13:20] start sftp server on :5222
INFO[2025-04-26 18:13:21] success load storage: [/阿里云盘Open], driver: [AliyundriveOpen], order: [0]
INFO[2025-04-26 18:13:21] success load storage: [/crypt], driver: [Crypt], order: [0]
INFO[2025-04-26 18:13:22] success load storage: [/dupan], driver: [BaiduNetdisk], order: [0]
INFO[2025-04-26 18:13:22] success load storage: [/ducrypt], driver: [Crypt], order: [0]
INFO[2025-04-26 18:15:37] [SFTP] swysgh(172.18.0.1:47088) logged in via password
ERRO[2025-04-26 18:15:37] sftpd servechannel failed:EOF
INFO[2025-04-26 18:15:41] [SFTP] swysgh(172.18.0.1:47090) logged in via password
ERRO[2025-04-26 18:15:41] sftpd servechannel failed:EOF
INFO[2025-04-26 18:15:45] [SFTP] swysgh(172.18.0.1:47104) logged in via password
INFO[2025-04-26 18:15:45] [SFTP] swysgh(172.18.0.1:47114) logged in via password
INFO[2025-04-26 18:15:45] [SFTP] swysgh(172.18.0.1:47124) logged in via password
INFO[2025-04-26 18:15:45] [SFTP] swysgh(172.18.0.1:47138) logged in via password
INFO[2025-04-26 18:15:45] [SFTP] swysgh(172.18.0.1:47140) logged in via password
INFO[2025-04-26 18:15:45] [SFTP] swysgh(172.18.0.1:47156) logged in via password
INFO[2025-04-26 18:15:46] [SFTP] swysgh(172.18.0.1:47160) logged in via password
INFO[2025-04-26 18:15:46] [SFTP] swysgh(172.18.0.1:47176) logged in via password
INFO[2025-04-26 18:15:46] [SFTP] swysgh(172.18.0.1:47186) logged in via password
INFO[2025-04-26 18:15:47] [SFTP] swysgh(172.18.0.1:47202) logged in via password
INFO[2025-04-26 18:15:48] [SFTP] swysgh(172.18.0.1:49944) logged in via password
INFO[2025-04-26 18:15:51] [SFTP] swysgh(172.18.0.1:49952) logged in via password
ERRO[2025-04-26 18:24:46] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:24:46] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:24:46] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:24:46] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:24:46] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:24:46] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:24:46] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:24:46] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:24:46] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:24:46] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:24:46] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:24:46] sftpd servechannel failed:EOF
INFO[2025-04-26 18:24:54] [SFTP] swysgh(10.1.0.11:39416) logged in via password
ERRO[2025-04-26 18:33:56] sftpd connection error:[only guest is allowed to login without authorization]
INFO[2025-04-26 18:37:31] [SFTP] swysgh(172.18.0.1:58764) logged in via password
INFO[2025-04-26 18:37:31] [SFTP] swysgh(172.18.0.1:58772) logged in via password
INFO[2025-04-26 18:37:31] [SFTP] swysgh(172.18.0.1:58774) logged in via password
INFO[2025-04-26 18:37:32] [SFTP] swysgh(172.18.0.1:58782) logged in via password
INFO[2025-04-26 18:37:32] [SFTP] swysgh(172.18.0.1:58788) logged in via password
INFO[2025-04-26 18:37:32] [SFTP] swysgh(172.18.0.1:58800) logged in via password
INFO[2025-04-26 18:37:32] [SFTP] swysgh(172.18.0.1:58814) logged in via password
INFO[2025-04-26 18:37:32] [SFTP] swysgh(172.18.0.1:58824) logged in via password
INFO[2025-04-26 18:37:32] [SFTP] swysgh(172.18.0.1:58830) logged in via password
ERRO[2025-04-26 18:37:33] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:37:33] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:37:33] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:37:33] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:37:33] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:37:33] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:37:33] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:37:33] sftpd servechannel failed:EOF
ERRO[2025-04-26 18:37:33] sftpd servechannel failed:EOF

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.