0
votes

I am doing one android application (client-Server type).

Up to now ,I installed tomcat in my system itself . So now server is my computer and client is my phone

Now I want to deploy my server components(.war file) in to tomcat stack of Google Cloud so that my application is accessible everywhere.

Used Google Cloud option, click-to-deploy tomcat stack to install tomcat on cloud.

Next thing is placing our war file in to the webapps..

I tried almost every possible way to do it..but every trail results in vain .. :/

Installed gcloud sdk ...finally placed this war file in our project(can be visible through SourceCode -> Browse )in cloud through some git ways ( not in webapps) and unable to copy it to webapps.

Tried various alterations of copy-file command but in vain because of file permission denied.

I am unable to change the permission of webapps.

Lastly i tried the filezilla , able to connect to the ip address and locate the webapps folder..but unable to place my file in that folder because of same permissions problem....tried to change the permission in that filezilla itself but it also results in vain.. :/

able to change permissions remaining folders but not this(webapps).

So finally decided take support from google through mail or phone but i am in bronze plan.So i can't take their support, We have permissions only to read the documentation and stuff.

So

Is there any one who worked on Google Cloud ,faced similar type of problem and solved it.????

or

Is there any one who knows how to change permission of webapps folder of Tomcat Stack, Google Cloud

Help me guys,I almost completed my project but this setup work is delaying my completion

Thanks in advance :)

2

2 Answers

3
votes

Finally i solved the problem.

I can actually send my war file directly from the local directory to the webapps directory of tomcat stack using filezilla or using gcloud copy file but the problem which i faced is 'permission denied'.

I solved this problem by

  1. connect to the ssh terminal
  2. type sudo bash to enter root terminal
  3. now typing chmod 777 /var/lib/tomcat7/webapps/ROOT
  4. close and re-open filezilla to get this updated permissions.

previously i was unable to change the permissions because i didn't enter in to root access.

now it's done.

0
votes

upload your file to the home directory of the user you've connected by FileZilla or used 'gcloud compute copy-files' command tool. Then use 'sudo cp' to copy it to webapps directory of tomcat:

sudo cp /home/sai/whatever.war /var/lib/tomcat7/webapps/ROOT/