How to use SFTP with PhpStorm to access server /var/www folder

978 views Asked by At

I am trying to use PhpStorm with remote server project, but unfortunately I cannot success in SFTP configuration.

I have followed these steps SFTP www. But I still get the same error ...

Write failed: Broken pipe
Couldn't read packet: Connection reset by peer

My ssh-config:

UsePAM yes
Subsystem sftp internal-sftp
Match user www-data
ChrootDirectory /var/www
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp

Permissions

chown root:root /var/www
sudo chown -R www-data:www-data /var/www/site

I have tried different ways, but still the same problem.

How to do this correctly, because it is real project, and I am worrying about wrong permissions.

Please help to solve this problem, I have spent several hours already dealing with it.

0

There are 0 answers