Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[RISOLTO] Tomcat: permission denied all'avvio
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
fridrik
n00b
n00b


Joined: 18 Dec 2004
Posts: 51

PostPosted: Sat Dec 18, 2004 11:07 pm    Post subject: [RISOLTO] Tomcat: permission denied all'avvio Reply with quote

Ciao a tutti

ho fatto l'emerge di tomcat5, inserendolo, con rc-update, nei servizi attivi al boot
ma non parte! infatti l'esecuzione di
Code:
/etc/init.d/tomcat5 start

mi restituisce un
Code:
start-stop-daemon: Unable to start /opt/tomcat5/bin/catalina.sh: Permission denied


da notare però che l'esecuzione "manuale"
Code:
/opt/tomcat5/bin/catalina.sh start

non da nessun problema

qualcuno ha avuto esperienze simili?


Last edited by fridrik on Sun Dec 19, 2004 12:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31465
Location: here

PostPosted: Sat Dec 18, 2004 11:09 pm    Post subject: Reply with quote

Non e' che metterlo all'avvio non riesce ad avviarsi visto che la rete viene tirata su dopo (se l'hai messa nel runlevel di boot). Prova a mettere tomcat al runlevel di default
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
fridrik
n00b
n00b


Joined: 18 Dec 2004
Posts: 51

PostPosted: Sat Dec 18, 2004 11:39 pm    Post subject: Reply with quote

ho fatto qualche controllo
no, tutti gli altri servizi (tra cui apache) partono correttamente

l'unica cosa che posso dire è che gli net.eth0 e net.eth1 non sono nel gruppetto dei servizi attivi al boot (e neanche default): anzi, se ce li metto non partono (e resto senza rete)

devo ammettere di non sapere in effetti come faccia a trovarmi la rete funzionante alla fine: sia la scheda di rete che la wireless funzionano correttamente 8O

per il resto, uno fra gli ultimi servizi a partire è tomcat, che però continua a dare lo stesso messaggio di errore :(
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31465
Location: here

PostPosted: Sat Dec 18, 2004 11:52 pm    Post subject: Reply with quote

Prova a postare un
Code:
$ ls -l /opt/tomcat5/bin/catalina.sh


PS: Benvenuto tra l'altro
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
fridrik
n00b
n00b


Joined: 18 Dec 2004
Posts: 51

PostPosted: Sun Dec 19, 2004 12:42 pm    Post subject: Reply with quote

Ho risolto!! :)
che figo pian piano imparo
dunque c'è un problema di permessi
in fase di installazione tutto tomcat viene installato come root e i file var sono ownati da root
dall'output di /etc/init.d/tomcat5 però
Code:
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/files/5.0.27/tomcat.init,v 1.3 2004/10/08 13:38:08 axxo Exp $

depend() {
        use dns logger mysql postgresql net
}

start() {
        ebegin "Starting Tomcat"
        start-stop-daemon --start --quiet --chuid tomcat:tomcat --exec ${CATALINA_HOME}/bin/catalina.sh -- ${TOMCAT_START}
        sleep 5
        eend $?
}

stop()  {
        ebegin "Stopping Tomcat"
        start-stop-daemon --start --quiet --chuid tomcat:tomcat --exec ${CATALINA_HOME}/bin/catalina.sh -- ${TOMCAT_STOP}
        sleep 5
        eend $?
}

intuisco che start-stop-daemon impersonifichi l'utente e il gruppo specificato dal parametro --chuid

la soluzione è quindi stata
Code:
# chown tomcat:tomcat -R /opt/tomcat5
# chown tomcat:tomcat -R /etc/tomcat5/
# chown tomcat:tomcat -R /var/log/tomcat5/

fatto questo tomcat parte correttamente :)
grazie per l'aiuto e grazie per il benvenuto!
non sono molto bravo nei convenevoli, ma spero di dare una mano anch'io quando possibile
CIAO!
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31465
Location: here

PostPosted: Sun Dec 19, 2004 1:02 pm    Post subject: Reply with quote

Ottimo sono contento :D. Hai anche messo il tag risolto :D
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
!equilibrium
Bodhisattva
Bodhisattva


Joined: 06 Jun 2004
Posts: 2109
Location: MI/BG/LC

PostPosted: Wed Feb 23, 2005 2:56 pm    Post subject: Reply with quote

riesumo questo post,
ho installato tomcat5 e ho avuto lo stesso problema dei permessi qui esposto.
la soluzione per tomcat5 è diversa da quella esposta da @fridrik

Code:
chown tomcat:tomcat -R /var/lib/tomcat-5/
chown tomcat:tomcat -R /etc/tomcat-5/ 
chown tomcat:tomcat -R /var/log/tomcat-5/


una cosa non mi è chiara,
questo non è un bug dell'ebuild? oppure è normale che l'ebuil non setti i permessi correttamente?
_________________
Arch Tester for Gentoo/FreeBSD
Equilibrium's Universe

all my contents are released under the Creative Commons Licence by-nc-nd 2.5
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Wed Feb 23, 2005 3:05 pm    Post subject: Reply with quote

Se non c'è ancora posta un bug report.
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
!equilibrium
Bodhisattva
Bodhisattva


Joined: 06 Jun 2004
Posts: 2109
Location: MI/BG/LC

PostPosted: Wed Feb 23, 2005 3:34 pm    Post subject: Reply with quote

gutter wrote:
Se non c'è ancora posta un bug report.


fatto segnalato come bug,
ho notato che non è la priama volta che un problema del genere viene segnalato su versioni precedenti ti tomcat,
per cui ne deduco che è una mancanza dell'ebuild, e la cosa mi lascia un po perplesso 8O
_________________
Arch Tester for Gentoo/FreeBSD
Equilibrium's Universe

all my contents are released under the Creative Commons Licence by-nc-nd 2.5
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Wed Feb 23, 2005 3:36 pm    Post subject: Reply with quote

DarkAngel76 wrote:

ho notato che non è la priama volta che un problema del genere viene segnalato su versioni precedenti ti tomcat,
per cui ne deduco che è una mancanza dell'ebuild, e la cosa mi lascia un po perplesso 8O


Si lo so ho usato tomcat una volta per delle JSP e mi ero reso conto del problema.
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum