5

Installed Tomcat7 via repository via Synaptic package manager

enter image description here

& pasted my app(Beerv1) folder to /var/lib/tomcat7/webapps/ & also to /usr/share/tomcat7-root/

Still gets

HTTP Status 404 - /Beerv1/form.html

Using:

CLASSPATH: /usr/share/tomcat7//bin/bootstrap.jar:/usr/share/tomcat7//bin/tomcat-juli.jar touch: cannot touch ‘/usr/share/tomcat7//logs/catalina.out’: Permission denied ./catalina.sh: 387: ./catalina.sh: cannot create /usr/share/tomcat7//logs/catalina.out: Permission denied

This error shows after I uninstalled Tomcat7 & downloaded package manually from apache-tomcat website, extracted it to (/usr/share) & added CATALINA_HOME=<path> & JAVA_HOME=<path>.

My webapps weren't working on repository package. I pasted my webapps in both folder /usr/share/tomcat7-root & /var/lib/tomcat7/webapps. In Windows just pasting webapps worked but in Ubuntu doesn't. Does it require any extra configuration?

I read somewhere that myapp.xml file should be made in /etc/tomcat7/conf/catalina folder & writing etc configurations. But that also didn't worked.

12
  • resource not found error...but my app works fine on Windows
    – Deepen
    Commented Feb 2, 2014 at 10:25
  • Any error in catalina.out or in locahosthost.<date>.log? Commented Feb 2, 2014 at 15:50
  • how do I ensure this?
    – Deepen
    Commented Feb 2, 2014 at 17:33
  • Using CLASSPATH: /usr/share/tomcat7//bin/bootstrap.jar:/usr/share/tomcat7//bin/tomcat-juli.jar touch: cannot touch ‘/usr/share/tomcat7//logs/catalina.out’: Permission denied ./catalina.sh: 387: ./catalina.sh: cannot create /usr/share/tomcat7//logs/catalina.out: Permission denied
    – Deepen
    Commented Feb 2, 2014 at 18:26
  • This error shows after I uninstalled tomcat7 & downloaded package manually from apache-tomcat website,extracted it to (/usr/share)& added CATALINA_HOME=<path> & JAVA_HOME=<path> @DavidLevesque
    – Deepen
    Commented Feb 2, 2014 at 18:27

1 Answer 1

10

The "Permission denied" error for the logs directory most likely means that the OS user running the Tomcat process does not have write permission on that directory.

Assuming you are running Tomcat with user "tomcat7", try setting the ownership and filesystem permissions of the logs directory, e.g.:

sudo chown -R tomcat7:tomcat7 /usr/share/tomcat7/logs
sudo chmod -R u+rw /usr/share/tomcat7/logs

If you are running Tomcat with a different OS user, replace tomcat7:tomcat7 by the username and primary group of that user, respectively.

1
  • Thnx! it worked! :)
    – Deepen
    Commented Mar 14, 2014 at 6:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .