严重错误:从 SFTP 服务器收到意外的文件结束信息

严重错误:从 SFTP 服务器收到意外的文件结束信息

我有一个 sftp 连接并且它运行良好,这是之前的工作设置:

#ADDED starts
Subsystem sftp internal-sftp
Match group sftpgroup
ChrootDirectory %h
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp -d /upload
#ADDED ends

现在,我不再尝试,而是home/upload尝试将根目录直接设置为 laravel 存储文件夹,并将其更新为:

#ADDED starts
Subsystem sftp internal-sftp
Match group sftpgroup
ChrootDirectory %h
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp -d ~/project.com/storage/app/public/upload
#ADDED ends

上传文件夹的组和权限:

drwxrwxr-x 2 forge www-data 4096 Sep 20 13:41 upload

以及sftpuser

sftpuser : sftpgroup www-data

更新后我收到的错误:FATAL ERROR: Received unexpected end-of-file from SFTP server

所有父文件夹的权限upload

forge@abc:~/project.com/storage/app$ ls -ld ~/{,project.com/{,storage/{,app/{,public/{,upload}}}}}
drwxr-xr-x+  9 forge forge    4096 Sep 20 13:14 /home/forge/
drwxrwxr-x  16 forge forge    4096 Sep 20 13:30 /home/forge/project.com/
drwxrwxr-x   5 forge www-data 4096 Sep 20 13:14 /home/forge/project.com/storage/
drwxrwxr-x   4 forge www-data 4096 Sep 20 13:41 /home/forge/project.com/storage/app/
drwxrwxr-x   3 forge www-data 4096 Sep 26 01:48 /home/forge/project.com/storage/app/public/
drwxrwxr-x   2 forge www-data 4096 Sep 26 01:48 /home/forge/project.com/storage/app/public/upload

相关内容