Answer the question
In order to leave comments, you need to log in
SCP log in as one user then change user and start copying?
In general, I don’t know how to file it
. This is how I used to copy without changing the user.
nohup scp -P 3022 -r . [email protected]:/var/www/MYSITE.com/httpdocs
Answer the question
In order to leave comments, you need to log in
If you have access to SCP then you should also have access to SSH. What prevents to copy the data under one user, and then through chown to change the rights to files?
serverA - the server on which the required file is located.
We execute on serverB:
And like this, if serverB is behind nat:
ssh serverA sudo cp /file /tmp/file && sudo chown webmaster /tmp/file
scp serverA:/tmp/file /file
ssh serverA sudo rm /tmp/file
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question