Using pscp and getting permission denied

前端 未结 3 1323
后悔当初
后悔当初 2021-02-05 05:40

I\'m using pscp to transfer files to a virtual ubuntu server using this command:

pscp test.php user@server:/var/www/test.php

and I get the erro

3条回答
  •  [愿得一人]
    2021-02-05 06:11

    If you own the server:

    Add yourself to the www-data group:

    sudo usermod -a -G www-data 
    

    And set the right permissions:

    sudo chown -R www-data:www-data /var/www/
    sudo chmod -R 0775 /var/www/
    

    This should do the trick.

提交回复
热议问题