commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haim Cohen" <hai...@gmail.com>
Subject jsvc credentials issue
Date Thu, 06 Nov 2008 14:36:41 GMT
Hi,

I have a strange problem with permissions when trying to launch application
as daemon using jsvc.
The platform is RHEL 5.0 and the user is root.

If I start my application directly, all is well.
When I start the application using jsvc, it fails on trying to open SNMP
port ("Permission denied").

I tried launching jsvc with and w/out the "-user root" switch.
SNMP failure is not due to port already bound – netstat shows the port is
free for use.
Failure is also not due to daemon loading failure: I do see my code is
running (thus loaded).

My configuration:
The main class 'MyClass' is packaged in myclass.jar file. This is the jar I
use when I directly start the application.
For jsvc I added a class:  'MyClassDaemon' (this implements the Daemon
interface jsvc is looking for) and it is contained within myclassdaemon.jar
file.
When I start jsvc I provide it with the MyClassDaemon class as entry point.
MyClassDaemon loads MyClass and fires it.

Not sure if this of any importance, but 'MyClass' using external classes
that comes as additional jar files.
I believe that for some reason, 'MyClass' is not called as root user but I
don't know how to confirm this and if this is the case, then how to change
it to work properly.

Any help would be greatly appreciated.

Thx

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message