vsftpd 因错误 451 中断上传

vsftpd 因错误 451 中断上传

有时候,vsftpd 几乎每天都会导致客户端上传崩溃。客户端通常上传 4 个大文件(> 1 GB)和一堆小文件。这些文件中至少有一个(通常是一个大文件)会因错误 451(接近末尾)而中断,但我真的不知道这是什么意思,而且从我在其他问题上看到的情况来看,人们因为权限问题而收到此错误,但事实并非如此。
有没有办法进一步调试或获取任何有用的信息?

软件是 centos 7 上的 vsftpd 版本 3.0.2。
记录的内容:

Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP response: Client "<ip>", "230 Login successful."
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP command: Client "<ip>", "CWD /mnt/QNAP/ac024/BatchUpload/"
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP response: Client "<ip>", "550 Failed to change directory."
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP command: Client "<ip>", "PASV"
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP response: Client "<ip>", "227 Entering Passive Mode (217,113,213,101,46,90)."
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP command: Client "<ip>", "LIST NOTIZIE OGGI - BL1 (REGISTRATO) - REGIA UNO_20220927055955.MP4"
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP response: Client "<ip>", "150 Here comes the directory listing."
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP response: Client "<ip>", "226 Directory send OK."
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP command: Client "<ip>", "PASV"
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP response: Client "<ip>", "227 Entering Passive Mode (217,113,213,101,45,171)."
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP command: Client "<ip>", "NLST NOTIZIE OGGI - BL1 (REGISTRATO) - REGIA UNO_20220927055955.MP4"
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP response: Client "<ip>", "150 Here comes the directory listing."
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP response: Client "<ip>", "226 Directory send OK."
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP command: Client "<ip>", "TYPE I"
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP response: Client "<ip>", "200 Switching to Binary mode."
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP command: Client "<ip>", "PASV"
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP response: Client "<ip>", "227 Entering Passive Mode (217,113,213,101,44,75)."
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP command: Client "<ip>", "STOR NOTIZIE OGGI - BL1 (REGISTRATO) - REGIA UNO_20220927055955.MP4"
Tue Sep 27 06:42:34 2022 [pid 23872] [ac024bu] FTP response: Client "<ip>", "150 Ok to send data."

Tue Sep 27 06:44:11 2022 [pid 23872] [ac024bu] FTP response: Client "<ip>", "451 Failure writing to local file."
Tue Sep 27 06:44:11 2022 [pid 23872] [ac024bu] FAIL UPLOAD: Client "<ip>", "/NOTIZIE OGGI - BL1 (REGISTRATO) - REGIA UNO_20220927055955.MP4", 1199503196 bytes, 12065.67Kbyte/sec
Tue Sep 27 06:44:11 2022 [pid 23872] [ac024bu] FTP command: Client "<ip>", "QUIT"
Tue Sep 27 06:44:11 2022 [pid 23872] [ac024bu] FTP response: Client "<ip>", "221 Goodbye."

答案1

根据您的日志,客户端在目录中犯了错误:

2022 年 9 月 27 日星期二 06:42:34 [pid 23872] [ac024bu] FTP 命令:客户端“”,“CWD /mnt/QNAP/ac024/BatchUpload/” 2022 年 9 月 27 日星期二 06:42:34
[pid 23872] [ac024bu] FTP 响应:客户端“”,“550 更改目录失败“”。

因此,它会上传当前目录(通常是用户主目录)中的文件,并且很有可能会填满该目录。确保目标目录/mnt/QNAP/ac024/BatchUpload/存在,并且用户有权在该目录中写入。

相关内容