Tomcat - Resolve "exists but is not accessible"

by
Jeremy Canfield |
Updated: January 05 2023
| Tomcat articles
Let's say the Tomcat log has something like this.
java.io.FileNotFoundException: /opt/jws-5.4/tomcat/keystore/keystore.p12 exists, but is not accessible
This is most like an issue with the permissions and ownership of the file/directory. Notice in this example that all of the other directories are owned by jboss whereas the keystore directory is owned by root. Updating the directory to have the expected permissions and ownership will almost always resolve the issue.
~]$ ls -l /opt/jws-5.4/tomcat/
drwxrwxr-x. 1 jboss root 4096 Apr 13 2021 bin
drwxrwxr-x. 1 jboss root 41 Jan 5 02:27 conf
drwxr-xr-x. 3 root root 26 Jan 5 02:27 keystore
drwxrwxr-x. 1 jboss root 4096 Apr 13 2021 lib
drwxrwxr-x. 1 jboss root 6 Sep 15 2020 logs
drwxrwxr-x. 1 jboss root 72 Nov 5 2020 selinux
drwxrwxr-x. 1 jboss root 71 Nov 5 2020 services
drwxrwxr-x. 1 jboss root 6 Sep 15 2020 temp
lrwxrwxrwx. 1 jboss root 12 Apr 13 2021 webapps -> /deployments
Did you find this article helpful?
If so, consider buying me a coffee over at