I want to upload a lib to my Tomcat folder (in an EC2 instance). What i have done is:
scp -r -i /home/path_to_key/key.pem /home/path_to_file/file.jar ec2-user@my_address.compute.amazonaws.com:/home/ec2-user
This works perfectly only if I upload files in the "user" folder. But when i try to to upload a file in /opt/tomcat7/lib/ ? I receive this error:
scp: /opt/tomcat7/lib/file.jar: Permission denied
Any suggestions as to what i should do?