I have uploaded a file to a remote Linux server.
current directory is: /home/user/file.war
Now i want to move the file into tomcat webapps
folder and overwrite the existing version:
The directory I want to move it to is: /var/lib/tomcat8/webapps
I tried it a few days ago using PuTTY, change to root user like this:
sudo -s
It asks for my user password and then as root i tried to copy the file with one of the following commands:
scp file.war root@ip:/var/lib/tomcat8/webapps
sudo scp file.war root@ip:/var/lib/tomcat8/webapps
scp /home/user/file.war root@server:/var/lib/tomcat8/webapps
Then it asks for my password again, but I only get a "Permission denied". The password seems to be alright, because otherwise I could not have logged in in the beginning. What am I doing wrong here?
Is it possible to get root access only with WinSCP? Logging in with sudo shell didn't work for me either...