- Revenera Community
- :
- Code Insight
- :
- Code Insight Knowledge Base
- :
- Permission Denied Exception
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Permission Denied Exception
Permission Denied Exception
Summary
You are unable to launch Tomcat or Detector and receive an error in $palamida/tomcat/logs/catalina.out .Symptoms
You are unable to launch Tomcat or Detector and receive the following or similar errors in $palamida/tomcat/logs/catalina.out:
WARNING: Due to a permissions issue accessing the log files, the status of the database has been changed to read only. java.io.FileNotFoundException: /home/palamida/workspaces/ePortal/workspace/log/log3.dat (Permission denied)
Cause
This and similar permissions errors can be caused by launching Tomcat with root permissions. The result of this is that any data created during that Tomcat session (such as scanning a workspace) will be written with root ownership; subsequent attempts to access data created during these sessions will thus be denied for having insufficient privileges.
NOTE: Tomcat should never be run with root user privileges
Resolution
There are two main approaches to this issue:
1)
- Re-launch Tomcat with your desired user.
- Create a new Workspace.
- Re-scan the materials from the inaccessible workspace in your new workspace.
2)
-
Determine the name of your Palamida database.
-
You can find the name of your database on the db.url line of $palamida/config/core/core.db.properties. For example:
db.url=jdbc:mysql://<HOST>:<PORT>/<YOUR_DATABASE_NAME>?autoReconnect=true
-
-
Within your workspaces/ directory, run the
ls -al
command to list the workspace directories along with their owner username and group.
-
For any workspaces with root ownership, run the following command, using the username you intend to use to launch the Palamida server, for example:
chown -R palamida:palamida /opt/palamida/workspaces