Forums

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

Jira User have no rights on startup-jira.sh how can i fix this

Ralf Thmas
Contributor
October 27, 2021

Hello,

 

the User Jria has no rights for startup-jira.sh

Screenshot 2021-10-27 153933.jpg

How can i fix this.

 

Greets

Ralf

 

4 answers

0 votes
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.
October 27, 2021

"su - jira not work" suggests the Jira user is set up correctly, as a non-login user.

You can change that by (carefully) editing /etc/passwd to change their shell.  Change it back when you've finished the test.

Ralf Thmas
Contributor
October 29, 2021

hello

 

what should i do ? Why change shell ?=

there is jira:x:1002:1003:Atlassian Jira:/home/jira:/bin/sh

 

Greets

Ralf

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.
October 29, 2021

Hmm, that looks ok to me.

What exactly do you get when you try

su - jira

Ralf Thmas
Contributor
October 29, 2021

than i get an

$

Robert Wen_Cprime_
Community Champion
October 29, 2021

That's the prompt for the jira user.  The su command is working.

From there, you should see if you can run /opt/atlassian/jira/bin/startup.sh from that prompt.

Ralf Thmas
Contributor
October 29, 2021

still permission denied

Screenshot 2021-10-29 163247.jpg

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.
October 29, 2021

What does 

ls -l /opt/atlassian/jira/bin/start*

show us?

Also, can you try

head -10 /opt/atlassian/jira/bin/startup.sh

Like Robert Wen_Cprime_ likes this
Ralf Thmas
Contributor
October 29, 2021

Hello,

 

i get this

Greets

Ralf

Screenshot 2021-10-29 164416.jpg

Robert Wen_Cprime_
Community Champion
October 29, 2021

For the ls command, there needs to be a space between "ls" and "-l"

Ralf Thmas
Contributor
October 29, 2021

ok. No permission

 

Screenshot 2021-10-29 165103.jpg

 

Greets

Ralf

Robert Wen_Cprime_
Community Champion
October 29, 2021

As the jira user, can you type "id" and show the output?

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.
October 29, 2021

I think there's a 99% chance that the files and/or directories are owned by the wrong account (probably root)

Can you check the first command when using su or logged in as root?

Ralf Thmas
Contributor
October 29, 2021

you mean that command ?

 

Screenshot 2021-10-29 180431.jpg

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.
October 29, 2021

Ok, so those permissions are utterly snarfed-up, but in a way that should actually be letting you do what you're trying to do.  Only other thing is that it might be the directory, so can you show us

  1. ls -l /opt/atlassian
  2. ls -l /opt/atlassian/jira 
  3. id

For 1 and 2, do it as root.  For 3, as @Robert Wen_Cprime_ said, run it while logged in as "jira"

And the "head" command is telling us something different again to the error message, but let's not worry about that yet

Ralf Thmas
Contributor
October 29, 2021

Hello,

the commands

 

Screenshot 2021-10-29 181639.jpgScreenshot 2021-10-29 181607.jpgScreenshot 2021-10-29 181620.jpgScreenshot 2021-10-29 181607.jpg

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.
October 29, 2021

We can't see what you are doing with half of those, there's four answers instead of three, and the first answer was to the third question but run for the wrong user.

Please, run questions 1 and 3 again, as the users asked for (your long screenshot shows us what you did and the results perfectly for question 2)

Ralf Thmas
Contributor
October 29, 2021

the user was the root ?

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.
October 29, 2021

Yes.  And I explicitly asked you to run one of the questions as another user, not root, as did Robert.

Like Robert Wen_Cprime_ likes this
Ralf Thmas
Contributor
November 18, 2021

what can i do to fix ?

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 18, 2021

I cannot tell, I do not know what you are getting when you try to run the commands as the right user.

Could you try running my questions 1 and 3 while logged in as your "jira" user, as I asked before?  What do they do?

Ralf Thmas
Contributor
November 19, 2021

Hello,

 

yes . Still no Permission

Screenshot 2021-11-19 180415.jpg

 

Greets

Ralf

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 19, 2021

Ok, so again, the "permission denied" when you try the "ls -l /opt/atlassian/jira" means that the jira user does not have the right to read that directory.

Assuming your jira user is the user with which you want to run Jira, then the most simple answer is to change the ownership of the jira installation and jira home directories so that jira is the owner of them.

I do not know what you have set up for Jira's home (data) directory, so I can't give you a copy-and-paste for one of the two commands to run, but you need to:

As root, run these two (while Jira is not running):

  • chown -R jira:jira /opt/atlassian/jira
  • chown -R jira:jira /<where-ever the jira data directory is>

 

As a worked example, one of my machines has a Jira installed like this:

nic@machine:/opt$ ls -l
drwxr-xr-x 14 charlie charlie  4096 Nov 29  2019 confluence
drwx------ 20 charlie charlie  4096 Nov 19 06:26 data-conf
drwx------ 14 charlie charlie  4096 Nov 19 06:31 data-jira
drwxr-xr-x 15 charlie charlie  4096 Oct 12  2019 jira
drwxr-xr-x  3 drone drone  4096 Nov 16 00:50 scripts

Now, I run both Jira and Confluence as a user called "charlie", I'm showing you a slightly over-complex example because it helps a bit with context.  You can see where the directories are for install and data for both systems here.

If I wanted to run Jira as the Jira user, as you do, I would need to run (as root), these two commands (as the ones I've given above)

  • chown -R jira:jira /opt/jira
  • chown -R jira:jira /opt/data-jira
0 votes
Girish_Shenoy
Community Champion
October 27, 2021

refer https://www.guru99.com/file-permissions.html

you can use chown and chmod commands to change the owner and give appropriate permissions. Please see the detailed examples from the link above.

Ralf Thmas
Contributor
November 18, 2021

hello,

 

yes file permissions on User jira. But not work

0 votes
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.
October 27, 2021

You've probably either installed it as the wrong user, or you've run something as the wrong user, and it's changed the ownership or permissions.

This isn't really an Atlassian issue - the permissions on the files on your server are up to you, but I think you'll find that what ever you have done, you have ended up with files in the installation that have mixed ownership - probably scattered between "jira" and "root", as that's the usual culprit for this problem.  The simple fix for this would be to run

chown jira:jira -R /opt/atlassian/jira/*

chown jira:jira -R <where-ever your jira home directory is>/*

Ralf Thmas
Contributor
October 27, 2021

Hello,

 

i set the rights . But still can not start

 

Screenshot 2021-10-27 162426.jpgScreenshot 2021-10-27 162614.jpg

0 votes
Robert Wen_Cprime_
Community Champion
October 27, 2021

Your Jira user is the owner of /opt/atlassian/jira and everything below, right?

Ralf Thmas
Contributor
October 27, 2021

yes i think . I did chown jira:jira -R /opt/atlassian/jira/*

Robert Wen_Cprime_
Community Champion
October 27, 2021

Try running this as the Jira user.

From root: 

su - jira

/opt/atlassian/jir/bin/start-jira.sh -fg

Ralf Thmas
Contributor
October 27, 2021

Permission denied

Robert Wen_Cprime_
Community Champion
October 27, 2021

Can you give the output of "ls -al" on /opt/atlassian/jira/bin ? Please send as a screenshot.

Ralf Thmas
Contributor
October 27, 2021

Screenshot 2021-10-27 163931.jpg

Ralf Thmas
Contributor
October 27, 2021

But  su - jira not work ! this is from root

Robert Wen_Cprime_
Community Champion
October 27, 2021

Can I see the error?

Ralf Thmas
Contributor
October 27, 2021

what error you mean. In First Description this one ?

Suggest an answer

Log in or Sign up to answer