I can't find how I can get write and read permission into the tomcat folder.
I followed DigitalOcean's tutorial on setting up Tomcat. The only thing I did different is that I used Java 8 instead of 7, but I don't think that this is causing the issue.
When I log into the tomcat web application manager and upload the war I get following error:
FAIL - Deploy Upload Failed, Exception: java.io.FileNotFoundException: /opt/tomcat/webapps/SimpleServlet.war (Permission denied)
When I use Filezilla to connect to EC2 and I want to drop the file into webapps folder:
Error: /opt/tomcat/webapps/SimpleServlet.war: open for write: permission denied
Error: File transfer failed
The output of
ls -la /opt/tomcat/webapps is:
total 28 drwxr-xr-x 7 root root 4096 Nov 20 09:19 . drwxr-xr-x 9 root root 4096 Nov 28 16:34 .. drwxr-xr-x 14 root root 4096 Nov 28 16:34 docs drwxr-xr-x 6 root root 4096 Nov 28 16:34 examples drwxr-xr-x 5 root root 4096 Nov 28 16:34 host-manager drwxr-xr-x 5 root root 4096 Nov 28 16:34 manager drwxr-xr-x 3 root root 4096 Nov 28 16:34 ROOT
but this is the folder structure that can be seen in FileZilla
On the tutorial I followed this step:
Then create a new tomcat user. We'll make this user a member of the tomcat group, with a home directory of /opt/tomcat (where we will install Tomcat), and with a shell of /bin/false (so nobody can log into the account):
sudo useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat
Could this be the problem?