Starting jira in Linux

Kota Sreenivasa Shravana Kumar July 23, 2013

To stop/start JIRA in Linux environment, which Linux user should be used ? Is it user "jira" or user "root". Starting/stopping jira as "root" user cause any kind of issues ?

Please advise. Thanks

4 answers

1 accepted

2 votes
Answer accepted
Andrew Culver
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 23, 2013

Since Jira 6, the startup process has been improved. If you installed Jira as root using the install wizard, it should have created a new "jira" user for you, as well as set up Jira as a service which will run automatically on startup. If you run /etc/init.d/jira {stop|start} as root, the script will drop itself to run as the "jira" user before starting the application.

Andrew Culver
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 23, 2013

It looks like 5.2 also creates a jira user, if the installer was run as root:
https://confluence.atlassian.com/display/JIRA052/Installing+JIRA+on+Linux
(see note at the end of step 1)

If you're unsure, you can run the start-jira.sh and stop-jira.sh scripts as the jira user, to be safe. These are in the bin directory of your Jira installation.

Andrew Culver
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 23, 2013

Step 4 of the above link also has instructions for setting up Jira to run as a service, if you didn't run the installer as root.

2 votes
C_ Faysal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 24, 2013

Hi.

do you have the init script installed?

if i am not totally wrong then the user jira is set inside there...

so this is the reason you can start jira using "/etc/init.d/jira start" as root user and the process owner will be user "jira"

as renjith already stated it is not recommended to run any service as root user. stick with the one your installer created for you and it should be fine.

0 votes
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 24, 2013

Shravana,

Running JIRA under root user is never recommeded. It is always safe to run JIRA under the limited user 'jira' which is taken care automatically, as Andrew says, if the installer was used.

Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 24, 2013
Kota Sreenivasa Shravana Kumar July 24, 2013

Renjith,

Even if start jira as root user in Linux. The owner of the process remains "jira". How does it cause issue ? Details below. Sorry, I am trying to understand.

ps -eaf | grep -i jira

jira 11786 1 4 Jul12 ? 12:25:08 /opt/atlassian/jira/jre//bin/java -Djava.util.logging.config.file=/opt/atlassian/jira/conf/logging.properties -XX:MaxPermSize=256m -Xms768m -Xmx4096m -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -XX:+PrintGCDateStamps -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/atlassian/jira/endorsed -classpath /opt/atlassian/jira/bin/bootstrap.jar:/opt/atlassian/jira/bin/tomcat-juli.jar -Dcatalina.base=/opt/atlassian/jira -Dcatalina.home=/opt/atlassian/jira -Djava.io.tmpdir=/opt/atlassian/jira/temp org.apache.catalina.startup.Bootstrap start

Thanks

0 votes
Kota Sreenivasa Shravana Kumar July 23, 2013

jira version which we are using : 5.2.7

Suggest an answer

Log in or Sign up to answer