Koozali.org: home of the SME Server

Java / Tomcat / .jar

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Java / Tomcat / .jar
« on: October 30, 2009, 07:19:03 PM »
I´m a complete newbie on JAVA.
I follow this howto: http://wiki.contribs.org/Tomcat

And have tomcat working (I access http://ip_server:8080 and get tomcat page.
BUT
I cannot access manager (saw message about authorization file and configurated it with a user/pwd), I´m getting a permission error:

Code: [Select]
"HTTP Status 403 - Access to the requested resource has been denied"
I´ve tryed to chmod tomcat:shared and other crazy things... but nothing works.
I´m out of tricks... can someone point me in some direction ?

My final goal is to run FreeRapid Downloader http://wordrider.net/freerapid/ to download HD movies from Rapidshare & Megaupload on my SME server with access from outside (tunnel ssh or VPN access, no external ports will be opened!)

Thanks

Jáder
« Last Edit: October 30, 2009, 07:24:43 PM by jader »
...

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: Java / Tomcat / .jar
« Reply #1 on: October 30, 2009, 08:35:52 PM »
Jader, there is a file under /conf named user.conf or user.xml (I don't remember) Edit this file and restart tomcat.

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: Java / Tomcat / .jar
« Reply #2 on: October 30, 2009, 08:46:46 PM »
Normando

[
Jader, there is a file under /conf named user.conf or user.xml (I don't remember) Edit this file and restart tomcat.

I saw this:
Quote
(saw message about authorization file and configurated it with a user/pwd),

the file is /opt/tomcat/conf/tomcat-users.xml
mine is:
Code: [Select]
<tomcat-users>
  <role rolename="tomcat"/>
  <user username="jader" password="xxxx" roles="tomcat"/>
</tomcat-users>

I was able to do login sometimes... I think was when changed group from tomcat to shared.
Now getting 403 only.

Thanks

Jáder



...

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Re: Java / Tomcat / .jar
« Reply #3 on: October 30, 2009, 08:54:21 PM »
ha, yes, ensure you have tomcat chowned all tomcat files:

Code: [Select]
chown -R tomcat.tomcat /opt/tomcat
Also you must ensure you have the role "manager" defined, also "admin".
This is my file:
Code: [Select]
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
  <role rolename="manager"/>
  <role rolename="admin"/>
  <user username="normando" password="xxxxxxxx" roles="manager,admin"/>
  <user username="admin" password="xxxxxxxxxx" roles="manager,admin"/>
</tomcat-users>

Restart tomcat and try again

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: Java / Tomcat / .jar
« Reply #4 on: October 30, 2009, 09:25:38 PM »
Normando

Create the admin and manager roles solve my problems.
Now I have manager interface running.

Let me see if I can run .jar files as I wish.

Thanks.
...