Difference between "Current Working Directory" and JIRA_HOME/jira.home

Christian Schlaefcke
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.
November 28, 2013

Hi,

I encounter a problem with a JIRA (5.x/6.x) regarding the Current Working Directory and the JIRA_HOME settings.

In the JIRA Administration => System Info I found the entry:

Current Working Directory = /opt/atlassian/inst

But my JIRA_HOME in the /opt/atlassian/inst/jira/atlassian-jira/WEB-INF/classes/jira-application.properties is set to

jira.home=/opt/atlassian/data/jira

I found a directory "attachments" under /opt/atlassian/inst and would have expected it to be located under /opt/atlassian/data/jira.

Can the Current Working Directory be configured somehow? I would like to keep everything in one place.

Best Regards,

Christian

8 answers

1 accepted

0 votes
Answer accepted
Dipti Ranjan Behera
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.
December 1, 2013

@christian

The CWD is automatically picked by JiRA from where you run the application server(startup.sh)

0 votes
Christian Schlaefcke
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.
December 1, 2013

Hi Dipti,

When I understand you right, JIRA uses the current directory location (./) for the CWD - right?

When I cd into /tmp and start JIRA with <ABSOLUTE_PATH_TO_JIRA_INST>/bin/start-jira.sh then JIRA will use /tmp as CWD - right?

This sound to me like JIRA don t cares for what I have defined in <JIRA_INST>/jira/atlassian-jira/WEB-INF/classes/jira-application.properties as jira.home.

And what I meant is that I would expect a behaviour where anything would be located in the jira.home that I declared - any other behaviour feels to me like magic/blackbox.

Another problem - what happens when Admin 1 is used to restart JIRA from his home dir using an absolute path. Admin 2 is always switching to JIRA_INST for doing that. First Admin 1 restarts JIRA and a few days later Admin 2 restarts JIRA. How can JIRA know about the different content in the different CWD locations (one in Admin 1 s home dir and one in <JIRA_INST>) ?

Maybe I did not get you point very well so far but I hope I can make clear, what my problem is :-)

Regards,

Christian

0 votes
Dipti Ranjan Behera
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.
December 1, 2013

@christian

Why would Jira require other files/folder , if it has every configuration in jira_home(which is configured) and the installation folders which will be accessed ?

0 votes
Christian Schlaefcke
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.
December 1, 2013

Hi Dipti,

Thank you for your answer!

But this is actually not what I would expect - imagine one user starts JIRA from his/her home directory (or even worst, from root s home directory) with an absolute path. How can JIRA access those folder/files later on?

Wouldn t it more convenient to use the JIRA_HOME right away? Why use another location anyway?

Regards,

Christian

0 votes
Christian Schlaefcke
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.
December 1, 2013

Okay - if so - where can the Current Working Directory be set?

I would like to like to set it to /opt/atlassian/data/jira like the jira.home variable defined in my <JIRA_INST>/jira/atlassian-jira/WEB-INF/classes/jira-application.properties.

0 votes
Dipti Ranjan Behera
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.
December 1, 2013

@christian,

Both have different meaning :

jira.home=/opt/atlassian/data/jira : It means this is where all jira's plugin , log configurations files are present. (it is constant)

Current Working Directory ( = /opt/atlassian/inst) : This means under which directory path you have started your jira application server (It can vary depending from where you start ur server)

0 votes
Christian Schlaefcke
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.
December 1, 2013

Thank you for your reply!

Maybe my description is a little bit misleading - but as mentioned above:

"... my JIRA_HOME in the /opt/atlassian/inst/jira/atlassian-jira/WEB-INF/classes/jira-application.properties is set to

jira.home=/opt/atlassian/data/jira ..."

Where JIRA_INSTALL = "/opt/atlassian/inst/jira"

And even with the setting above I get a different Current Working Directory ( = /opt/atlassian/inst)

Regards,

Christian

0 votes
Alejandro Conde Carrillo
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.
December 1, 2013

The JIRA home directory is specified in the file <JIRA_INSTALL>/atlassian-jira/WEB-INF/classes/jira-application.properties . Check it is set to the correct value. If you change it you will need to restart JIRA to pick up the changes.

Please be aware that attachments and config files are stored in your JIRA home. Please make sure you set it to a directory which contains the right data.

More info in Setting your JIRA Home Directory.

Suggest an answer

Log in or Sign up to answer