Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Installation issues with permissions

Nora November 1, 2018

Hello!

I'm having a bit of an issue installing Jira on CentOS 7 with Virtualmin. The same issue mentioned in this closed report

Basically, I'm installing Jira as per the instructions and when I try to start the service, I get:

executing using dedicated user: jira
bash: ./startup.sh: Permission denied

I then go to the specified installation directory and see that everything is owned by root:root. I fix the permissions recursively as per this article by Atlassian and make sure that both the installation dir and the home dir are owned by jira:jira. When I try to start the service, I see this new error:

executing using dedicated user: jira
./startup.sh: line 64: /%jira-install-dir%/bin/catalina.sh: Permission denied
./startup.sh: line 64: exec: /%jira-install-dir%/jira/bin/catalina.sh: cannot execute: Permission denied

I am officially stuck. I tried deleting everything and starting anew, same thing happens.

Any ideas?  

3 answers

1 accepted

2 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 6, 2018

Hi Nora,

I would recommend taking a closer look at this related thread: https://community.atlassian.com/t5/Jira-questions/Jira-not-starting-with-the-command-service-jira-start/qaq-p/81166

In it, the errors appear to be very similar as yours.  I suspect that you might have permissions to that .sh file, but that this file is needing to have access to other folders/subfolders in both the $JIRAHOME and $JIRAINSTALL directories and their subdirectories.

In addition to the specific changes Andris recommended there, he also mentioned a few other things to try such as:

Try starting jira with this command (from root):
su - jira2 -c "/opt/atlassian/jira/bin/start-jira.sh"

In your case change the jira2 to jira and perhaps this can help give us more information.  I suspect there might be something different in regards to the user accounts here, but I'm not sure just yet.

Andy

Nora November 6, 2018

Hello, Andrew! 

Thank you for looking into it!

I actually came upon that same thread while I was searching for answers to my issue. The command, ran as root, has the following output:

 su - jira -c "/home/jira-host/public_html/jira/bin/start-jira.sh"
-bash: /home/jira-host/public_html/jira/bin/start-jira.sh: Permission denied
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 6, 2018

Could you try to run the following commands:

ls -la /home/jira-host/public_html/jira

 

as well as the $JIRAHOME directory

 

ls -la $JIRAHOME

 

I'm interested to see if we can look at each of the file permissions in those directories to better understand your environment.

Nora November 7, 2018

Here you go!

 

[root@---]# ls -la /home/jira-host/public_html/jira
total 192
drwxr-xr-x. 15 jira      jira       4096 Nov  1 13:29 .
drwxr-x---.  5 jira-host jira-host   129 Nov  1 13:29 ..
drwxr-xr-x. 17 jira      jira       4096 Nov  1 13:28 atlassian-jira
drwxr-xr-x.  3 jira      jira       4096 Nov  1 13:42 bin
drwxr-xr-x.  2 jira      jira        238 Nov  1 13:28 conf
drwxr-xr-x.  2 jira      jira         41 Nov  1 13:28 external-source
drwxr-xr-x.  3 jira      jira       4096 Nov  1 13:29 .install4j
-rwxr-xr-x.  1 jira      jira      83990 Nov  1 13:29 install.reg
drwxr-xr-x.  4 jira      jira        129 Nov  1 13:28 jre
drwxr-xr-x.  2 jira      jira       4096 Nov  1 13:28 lib
drwxr-xr-x.  2 jira      jira      49152 Nov  1 13:28 licenses
drwxr-xr-x.  2 jira      jira          6 Oct 12 13:55 logs
-rwxr-xr-x.  1 jira      jira       1774 Oct 12 13:54 NOTICE
-rwxr-xr-x.  1 jira      jira       3835 Oct 12 13:54 README.html
-rwxr-xr-x.  1 jira      jira       2097 Oct 12 13:54 README.txt
drwxr-xr-x.  2 jira      jira         48 Nov  1 13:28 temp
drwxr-xr-x.  2 jira      jira         61 Nov  1 13:28 tomcat-docs
-rwxr-xr-x.  1 jira      jira      11201 Oct 12 13:55 uninstall
drwxr-xr-x.  2 jira      jira          6 Oct 12 13:55 webapps
drwxr-xr-x.  2 jira      jira          6 Oct 12 13:55 work
[root@---]# ls -la /home/jira-host/jira-home/
total 4
drwxr-xr-x.  2 jira      jira         6 Nov  1 13:28 .
drwxr-x---. 14 jira-host jira-host 4096 Nov  1 13:28 ..
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 9, 2018

Those permissions appear to be ok to me.    Forgive me if you have already done these steps, but if not, please try this once more:

su - root
# Insert password for your root user
chown -R jira:jira /home/jira-host/public_html/jira/
chown -R jira:jira /home/jira-host/jira-home/
logout
# Login as the jira user into the bash/shell prompt
./stop-jira.sh
./start-jira.sh

Please let me know what error might appear here, you can then also try to sudo ./start-jira.sh to see if elevating the priviledge of this user at this time might help.

 

I'm concerned that perhaps one or more of the subdirectories might not have the permissions needed, but if you're already done this, we should be seeing something more detailed in the error message to help point us in the right direction.

You could also try to look for the $JIRAINSTALL/logs/catalina.out file.  This is a log file created by the tomcat process that Jira is using when starting, sometimes this log file has additional information that might not exist in the $JIRAHOME/log/atlassian-jira.log file.

Nora November 12, 2018

Hi again, Andrew!

While carrying out the commands, I realized that the jira user doesn't have permission to access the jira-host directory. I added it to the jira-host group and everything else started working!

Thank you for the assistance! 

1 vote
Nic Brough -Adaptavist-
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 1, 2018

I suspect you've only made the directories owned by jira:jira

The doc says you need to do the same for all contents within them.  Try "chown -R jira:jira jira-directory", rather than "chown jira:jira jira-directory"

Nora November 1, 2018

I've done it all recursively, yes. All files, folders, subfolders, everything.

Nic Brough -Adaptavist-
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 1, 2018

Mmm.  Could you actually show us what the permissions are set to on a file that's failing?

Nora November 1, 2018

Sure thing! There you go:

-rwxr-xr-x.  1 jira jira  24K Oct 12 13:54 catalina.sh

 

Nic Brough -Adaptavist-
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 1, 2018

Hmm, if the "jira" user is trying to run that and failing, then it's not the file permissions.

Could selinux be blocking it all?

Nora November 2, 2018

Good suggestion! However, it appears to be disabled:

$ sestatus
SELinux status:                 disabled 
0 votes
Jacques
Contributor
February 11, 2019

Hey Nora,

I have had a case where I installed Jira twice on the same machine, executing the installation as root. As a result the setup program created another username, with name "jira1". I had to change a file /jira_install/bin/user.sh and correct the user the application is executing with.

This article might help.

Alex
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 2, 2022

It would be nice if installation script would look if there is a user already or give an option to tell that it would create a user. 

Like int-system_gmofh_com likes this

Suggest an answer

Log in or Sign up to answer