0

I am trying to copy a folder as a root user from my local machine to my server using the command

sudo scp -r simple-app.zip james@ip:/home/jobs 

But I keep getting permission denied every time. And this is after I have logged into my server successfully.

I need help doing this.

2
  • 1
    Please copy and paste the command you tried and output from the terminal in your question, formatted as code. For one, it is unlikely that you succeeded with the command Sudo. . Perhaps one of the issues is that you do not tell where to copy on the server. That you are root on your local machine does not imply you are also root on the remote machine.
    – vanadium
    Oct 29, 2021 at 16:33
  • Use the {_} icon above the edit question window to format the pasted output as code.
    – user68186
    Oct 29, 2021 at 16:44

1 Answer 1

2

You are running scp command as root on your local computer. But you are not root at your remote computer - you are james there. Check if james has write permissions in /home/jobs or maybe you missspell destination folder and it should be /home/james/jobs?

2
  • Thank you. It worked Oct 29, 2021 at 20:34
  • Excellent! Please mark this answer as correct for future answer searchers.
    – Serg
    Oct 30, 2021 at 9:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .