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

pscp target\app.war root@

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@

Thanks for your suggestions


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@ 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.