Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

[linux/init.d]: Use jsvc's -user option instead of sudo su to start jsvc #21

Open
fpauser opened this issue May 31, 2012 · 2 comments
Open
Labels

Comments

@fpauser
Copy link

fpauser commented May 31, 2012

[..] Jsvc is a daemon process so it should be started as root and the -user parameter allows to downgrade to an unprivilegded user. [..]

As issues #12 and #16 could be fixed in jsvc-1.0.10. See https://issues.apache.org/jira/browse/DAEMON-242 and discussion in #20.

@kares
Copy link
Member

kares commented May 31, 2012

we're bundling 1.0.10 I've compiled and tried to verify if the isssue got fixed but somehow with no luck:

  • daemon starts fine (using sudo -u kares) under root user but adding jsvc -user kares instead of the sudo fails to start with a Cannot locate Java Home message
  • daemon starts fine under non-root user but simply changing jsvc -user kares makes it "unusable" - all seems fine except the application does not start nor a pid file gets created

thus it's still very confusing, tested on Ubuntu 11.10 32-bit (3.0.0-17-generic-pae)
as far as I remember it was not-working but printing something else on Debian GNU/Linux 6.0.1 (squeeze)

I previously thought we can do a check using a dummy daemon executable during the configuration, but the second case which is most likely to be the main scenario makes it kind of indistinguishable from a successful daemon start.

@ansel1
Copy link

ansel1 commented Oct 11, 2012

I've also resorted to using the RUN_USER/sudo, but ran into another problem: I'm not seeing how to set the environment for trinidad. the sudo call in /etc/init.d/trinidad wipes out any existing env I set up.

@kares kares added the feature label Jun 29, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants