Tomcat – Unable to copy war file from local directory to webapps of tomcat stack in Google Cloud because of permissions

androidgoogle-app-enginegoogle-cloud-platformgoogle-compute-enginetomcat

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

Best Answer

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

connect to the ssh terminal type sudo bash to enter root terminal now typing chmod 777 /var/lib/tomcat7/webapps/ROOT 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.