Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm - Deployment - Cannot Upload New Files

Tags:

phpstorm

sftp

ftp

When I try to create a new file/folder in PhpStorm I get a Permission denied error. However, when I create a new file in a folder that already exists in the root directory of my server I can without any errors.

When I try to create a new file:

[2016-03-07 11:29 AM] Failed to transfer file 'C:\Users\D\PhpstormProjects\example2\test.php': could not write to "sftp://www.example.com/test.php". (Permission denied)
[2016-03-07 11:29 AM] Automatic upload completed in less than a minute: 2 items failed

When I try to create a new folder:

[2016-03-07 11:27 AM] Failed to create folder '/var/www/html/test': could not create folder "sftp://www.example.com/test". (Permission denied)
[2016-03-07 11:27 AM] Automatic upload completed in less than a minute: 1 item failed
like image 688
Bxx Avatar asked Oct 17 '25 10:10

Bxx


1 Answers

You can try this :

chmod -R 777 /var/www
chgrp www-data /var/www
chown -R www-data /var/www

useradd -G {www-data} your_username
like image 120
darkomen Avatar answered Oct 20 '25 09:10

darkomen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!