Reputation: 361
I've just installed Tomcat 7 in Ubuntu 13.04 but i have a problem in starting the server.
I've installed Tomcat 7 by the command:
tar -xzpf ./apache-tomcat-7.0.26.tar.gz -C /chemin_vers_dossier_d_installation/
and to start the server :
/opt/apache-tomcat-7.0.39/bin/catalina.sh run
but i had this error message:
run
Using CATALINA_BASE: /opt/apache-tomcat-7.0.39
Using CATALINA_HOME: /opt/apache-tomcat-7.0.39
Using CATALINA_TMPDIR: /opt/apache-tomcat-7.0.39/temp
Using JRE_HOME: /home/fakarovic/jdk1.6.0_45/
Using CLASSPATH: /opt/apache-tomcat-7.0.39/bin/bootstrap.jar:/opt/apache-tomcat-7.0.39/bin/tomcat-juli.jar
May 10, 2013 9:19:32 AM org.apache.catalina.startup.Catalina load
WARNING: Unable to load server configuration from [/opt/apache-tomcat-7.0.39/conf/server.xml]
May 10, 2013 9:19:32 AM org.apache.catalina.startup.Catalina load
WARNING: Permissions incorrect, read permission is not allowed on the file.
May 10, 2013 9:19:32 AM org.apache.catalina.startup.Catalina load
WARNING: Unable to load server configuration from [/opt/apache-tomcat-7.0.39/conf/server.xml]
May 10, 2013 9:19:32 AM org.apache.catalina.startup.Catalina load
WARNING: Permissions incorrect, read permission is not allowed on the file.
May 10, 2013 9:19:32 AM org.apache.catalina.startup.Catalina start
SEVERE: Cannot start server. Server instance is not configured.
NB: I already defined the JAVA_HOME variable.
Upvotes: 1
Views: 10520
Reputation: 71
Follow the below steps for Windows users
Security tab
, make sure the user permissions are assigned with full-control Advanced Security Settings
pop-up, click on Add button and add user by selecting the principal
Upvotes: 0
Reputation: 2982
An option is the following :
sudo chgrp -R <user> <directory_server.xml>
For example :
sudo chgrp -R tomcat /opt/apache-tomcat-7.0.39
Where :
chgrp -R
is the assignment of permitstomcat
is the user/opt/tomcat
is the directory where is it server.xml
Upvotes: 0
Reputation: 295
Tomcat has strengthened the security requirements at file system level, that's why if you are upgrading from an earlier version, you will have this problem.
From: https://tomcat.apache.org/tomcat-7.0-doc/security-howto.html
File permissions should also be suitably restricted. Taking the Tomcat instances at the ASF as an example (where auto-deployment is disabled and web applications are deployed as exploded directories), the standard configuration is to have all Tomcat files owned by root with group Tomcat and whilst owner has read/write privileges, group only has read and world has no permissions.
Means you have to restrict the others access permissions to tomcat's directories. Specially $TOMCAT_HOME/conf. That's why you are getting the error, because there's more access that minimum required for Tomcat to start.
Long story short, restrict Tomcat directory access to only the user running the process.
The exceptions are the logs, temp and work directory that are owned by the Tomcat user rather than root.
Upvotes: 1
Reputation: 26518
Its a problem related to file permissions in linux. Check your file permission of tomcat installation directory, change it then it will work.
Becauase see this line of the log
May 10, 2013 9:19:32 AM org.apache.catalina.startup.Catalina load
WARNING: Permissions incorrect, read permission is not allowed on the file.
The excpetion is itself shouting that I have a file permission problem.
Upvotes: 0