RE: Issues on startup for tomcat 5.5 on RHEL 5.5

2010-12-08 Thread Jason Pyeron

 -Original Message-
 From: Konstantin Kolinko 
 Sent: Wednesday, December 08, 2010 0:29
 To: Tomcat Users List
 Subject: Re: Issues on startup for tomcat 5.5 on RHEL 5.5
 
 2010/12/7 Jason Pyeron jpye...@pdinc.us:
 
  The permissions on /usr/share/tomcat5/conf/ are 775 and 
 owned by root.tomcat.
 
 It is a bad idea to have the configuration files world-readable.
 
 Especially tomcat-uses.xml and server.xml.
 
 

That is a valid point but not the issue at hand.

  java.io.IOException: IOException writing to 
  /usr/share/tomcat5/conf/tomcat-users.xml.new
 
 What you do not understand in the above message?
 Tomcat saves the file to a new name, then renames it.
 

I understand the message, it says tomcat cannot write that file. What I do not
understand is how it cannot write that file.

 BTW, it is possible to set readonly=true on the 
 UserDatabase entry in server.xml and Tomcat won't try to 
 write that file. (In Tomcat 6+ readonly flag is true by default).
 
  cat /etc/tomcat5/tomcat-users.xml
 
 This file is not in /usr/share/tomcat5/conf/
 

Right, that is a symlink to /etc/tomcat5, which has all the properties as
decribed for /usr/share/tomcat5/conf/ (if I had tested /usr/share/tomcat5/conf
then the information provided would have been for the symlink and not the
target)


So the question remains, what could have changed on the RHEL 5.5 system between
last week and present to make tomcat complain. Unfortunatly the backups of the
system were only on /usr/local and /home so theyt were of no help and the rpm
log only indicates a kerbos update.

-Jason

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.

 



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Issues on startup for tomcat 5.5 on RHEL 5.5

2010-12-08 Thread Konstantin Kolinko
2010/12/8 Jason Pyeron jpye...@pdinc.us:
  java.io.IOException: IOException writing to
  /usr/share/tomcat5/conf/tomcat-users.xml.new

 What you do not understand in the above message?
 Tomcat saves the file to a new name, then renames it.


 I understand the message, it says tomcat cannot write that file. What I do not
 understand is how it cannot write that file.


Try to create that file. Maybe that'd give you some additional clue.
Maybe the file is already there, or maybe Tomcat runs not under the
user that you are expecting (or that user is non a member of the
tomcat group).

Anyway, I certainly recommend you to set readonly=true. [1]

 BTW, it is possible to set readonly=true on the
 UserDatabase entry in server.xml and Tomcat won't try to
 write that file. (In Tomcat 6+ readonly flag is true by default).


[1] 
http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html#UserDatabase_Resources

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Issues on startup for tomcat 5.5 on RHEL 5.5

2010-12-08 Thread Jason Pyeron
 -Original Message-
 From: Konstantin Kolinko 
 Sent: Wednesday, December 08, 2010 9:35
 To: Tomcat Users List
 Subject: Re: Issues on startup for tomcat 5.5 on RHEL 5.5
 
 2010/12/8 Jason Pyeron jpye...@pdinc.us:
   java.io.IOException: IOException writing to 
   /usr/share/tomcat5/conf/tomcat-users.xml.new
 
  What you do not understand in the above message?
  Tomcat saves the file to a new name, then renames it.
 
 
  I understand the message, it says tomcat cannot write that 
 file. What 
  I do not understand is how it cannot write that file.
 
 
 Try to create that file. Maybe that'd give you some additional clue.
 Maybe the file is already there, or maybe Tomcat runs not 
 under the user that you are expecting (or that user is non a 
 member of the tomcat group).

Maybe I forgot to mention in my original post, that the tomcat user can create
and modify files in that directory, further that I checked the selinux log file
while the error was happening and there was no relevant output. 

 
 Anyway, I certainly recommend you to set readonly=true. [1]
 

It is set to readonly now. But there was some change on the system, which caused
it to stop working in readwrite mode. Tomcat had been installed and functioning
every week for many months now.

  BTW, it is possible to set readonly=true on the 
 UserDatabase entry 
  in server.xml and Tomcat won't try to write that file. (In 
 Tomcat 6+ 
  readonly flag is true by default).
 
 
 [1] 
 http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.h
tml#UserDatabase_Resources

I do not have any use for built in user authentication. I will eventually try to
disable it entirely.


--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Issues on startup for tomcat 5.5 on RHEL 5.5

2010-12-07 Thread Konstantin Kolinko
2010/12/7 Jason Pyeron jpye...@pdinc.us:

 The permissions on /usr/share/tomcat5/conf/ are 775 and owned by root.tomcat.

It is a bad idea to have the configuration files world-readable.

Especially tomcat-uses.xml and server.xml.


 java.io.IOException: IOException writing to
 /usr/share/tomcat5/conf/tomcat-users.xml.new

What you do not understand in the above message?
Tomcat saves the file to a new name, then renames it.

BTW, it is possible to set readonly=true on the UserDatabase entry
in server.xml and Tomcat won't try to write that file. (In Tomcat 6+
readonly flag is true by default).

 cat /etc/tomcat5/tomcat-users.xml

This file is not in /usr/share/tomcat5/conf/

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org