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?
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mmm. Could you actually show us what the permissions are set to on a file that's failing?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.