Last time, I was able to install Tomcat on my VPS, so when I tried to export and deploy a War file like Hello World in Eclipse, I stumbled a bit.
/opt/tomcat/webapps/
I should be able to do it just by scpping directly under it, but I was told that permission was denied.
When I checked the authority, it was only reading other than root, so
cd /opt/tomcat
chmod -R 766 webapps
You can go with this because you just specify and start over and write it, right? I thought, but permission denied. why?
So, let's add the tomcat group attribute to the user account. permission denied.
・ ・ Hmm? ?? Ah, maybe the programmer just copies it, but it's automatically unzipped, and the person who copies it also has execute permission?
so,
cd /opt/tomcat
chmod -R 777 webapps
When I tried it, I was able to copy it safely, and even when I accessed it with a browser, it worked fine.
However, as it is, anyone can write to this folder, so I wonder if I should set the deploy user of the application to the tomcat group and set it to 770.
Since tomcat has a mechanism to deploy with a web console, it seems better to set it and start from there. I tried it, but I couldn't enter it with 403 because the setting part was not enough, so I deployed it with SCP for the time being.
Recommended Posts