SonarQube service should not run as root

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SonarQube service should not run as root

Harald Wellmann
After setting up SonarQube to run as a service following this article, I found the service running as root.

SonarQube should be running under a dedicated user account.

I'm using an account "sonar" which owns the installation directory. Up to now, I had started the SonarQube process manually.

Now after installing the init script and starting the service, SonarQube was running as root, also leaving files owned by root in the sonar home directory.

To fix this, I edited bin/linux-x86-64/sonar.sh:

  RUN_AS_USER=sonar

and changed the ownership of all files in the installation directory:

  chown -R sonar.sonar /home/sonar

Please review and update the Setup guide for the benefit of new users.

Best regards,
Harald


Reply | Threaded
Open this post in threaded view
|

Re: SonarQube service should not run as root

sadu99
This post has NOT been accepted by the mailing list yet.
Hi,
I get the following error:
"chown: invalid user: ‘sonar.sonar’".

Any ideas how to fix this?