Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Inquisitive's avatar

Update sftp directory to /var/www/project/storage/app/uploads

i have a sftp connection and it is working fine, this was the previous working setup:

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

now instead of home/taapload, I am trying to set the root directory to the laravel storage folder directly and updated it to:

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

the group and permission of the upload folder:

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

and the group of sftpuser

sftpuser : sftpgroup www-data

Error I am receiving after the update: FATAL ERROR: Received unexpected end-of-file from SFTP server

0 likes
0 replies

Please or to participate in this conversation.