End game: Copy project directory to tomcat webapps directory hosted on ec2.
I have an amazon linux instance, I install tomcat via
sudo yum install tomcat7-webapps
When I first ssh in I am led to a home folder. From there I must cd twice, then proceed to
/var/lib/tomcat7/webapps
I tried to transfer the directory using filezilla, but I don't have write permissions here.. also attempted to change the permissions but it's not allowed. Should I have installed tomcat to my home directory perhaps?
I also tried to set up a repository with git but running git init failed as it couldn't write.
Read about scp, could I use that to transfer the entire directory?
Any help here is much appreciated! I read a ton of older posts but nothings working for me.
- importing pem to filezilla, set up as sftp user:ec2-user
EDIT: I have sorted it out! My solution:
Find where tomcat was installed, in my case
/var/lib/tomcat7
and run the following:
sudo usermod -a -G tomcat7 ec2-user
sudo chmod -R g+w /var/lib/tomcat7
I found this question being asked a ton, so I hope this helps anyone with this problem in the future! Give this guy a vote if it helps. Solution