Using pscp and getting permission denied

5,537

You're most likely correct that you don't have access to /var/www/. What you can do is chmod /var/www/ to allow guest to write and change it back to original state once complete (I would advice against this). You can add the user to the group that owns /var/www/ and make sure the group is set for read/write/execute.

Share:
5,537

Related videos on Youtube

Espen
Author by

Espen

Updated on September 18, 2022

Comments

  • Espen
    Espen over 1 year

    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 error permission denied. If I try to transfer to the folder /home/user/ I have no problems.

    I guess this has to do with that the user I'm using doesn't have access to the folder /var/www/. When I use SSH I have to use sudo to get access to the /var/www/ path - and I do.

    Is it possible to specify that pscp should "sudo" transfers to the server so I can get access to the /var/www/ path and actually be able to transfer files to this folder?