0

I am transferring my file using pscp with the command below:

pscp target\app.war root@127.0.0.1:/jetty/webapps

What would be the syntax to change the ownership of the app.war file ? In other words to perform chown -R jetty:jetty to the app.war using pscp ?

Something like:

pscp chown -R jetty:jetty root@127.0.0.1:/jetty/webapps/app.war

Thanks for your suggestions

stambata
  • 1,598
  • 3
  • 13
  • 18
  • No such synatx - still in the wishlist: http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/pscp-filemodes.html – HBruijn Jul 12 '16 at 08:56

1 Answers1

1

You can't do this with pscp which is an implementation of scp.

Perhaps you should look at ssh or plink to remote in to the system and run a command e.g.

plink root@127.0.0.1 chown -R jetty:jetty /jetty/webapps/app.war

Notes: The above is untested but you should be able to figure it out if it doesn't work. For a single file you don't really need -R It seems odd that you are scping to your localhost when a simple copy should do the trick.

user9517
  • 114,104
  • 20
  • 206
  • 289