starting confluence as root

Hi,

I receive the following after attempting to start confluence as root. What are my options so I can start confluence?

root@xxxxx% start-confluence.sh

To run Confluence in the foreground, start the server with start-confluence.sh -fg
executing using dedicated user: confluence
/sbin/runuser: user confluence does not exist
You have mail in /var/spool/mail/root

Thank You

3 answers

1 accepted

This widget could not be displayed.

Never start an service as root, as this is secrity risk.

create dedicated unprivilaged user for your service:

root@localhost ~]# adduser confluence

change ovnership of confluence files to this user:

root@localhost ~]# chown -R confluence:confluence /opt/atlassian-confluence

where /opt/atlassian-confluence is path where you have your service installed. Do the same ownership change to the confluence data directory.

Than start confluence, as usual.

You can also modifiy "start-confluence.sh" script to run as a root, but I would strongly discouraged it.

Confluence 4.3 script is based on variable $CONF_USER, that is set by user.sh so you might want to change it. On conflu 4.3 it looks like this:

root@localhost ~]# cat user.sh 
# START INSTALLER MAGIC ! DO NOT EDIT !
CONF_USER="confluence" ##
# END INSTALLER MAGIC ! DO NOT EDIT !
export CONF_USER

so setting it to root would solve this, but I wouldn't do it if I were you.

Doesn't help me :-(

[root@mdb4 bin]# ls -la start-confluence.sh

-rwxr-xr-x 1 confluence confluence 1275 Oct 18 02:51 start-confluence.sh

[root@mdb4 bin]# /opt/atlassian/confluence/bin/start-confluence.sh

To run Confluence in the foreground, start the server with start-confluence.sh -fg

executing using dedicated user: confluence

bash: /opt/atlassian/confluence/bin/startup.sh: Permission denied

Milan, just as Henrique Lechner said:

make sure that every bash script in /opt/atlassian/confluence/bin/ is exectutable. To do so, you can add -x flag to those files:

chmod +x /opt/atlassian/confluence/bin/*sh

You start confluence by executing start-confluence.sh but this script will execute other scripts. ex.: catalina.sh, startup.sh. so they must be also executable.

I've tried chmod on both root and confluence and still get permission denied. This is on CentOS 6.7. Any suggestions?

This widget could not be displayed.

Hi Milan Ristic,

Looks like you do have permission over start-confluence.sh but you still don't have it over "/opt/atlassian/confluence/bin/startup.sh" which is called by the first.

Could you please verify if the file have the confluence as owner and if it has the permission 755 (-rwxr-xr-x)?

If not, just execute these commands as root:

# chmod 755 /opt/atlassian/confluence/bin/startup.sh

# chown -R confluence:confluence /opt/atlassian/confluence

The first command will change the permission of the file and the second will re-apply user and group "confluence" to all files on your instance.

Regards,

Henrique Lechner

This widget could not be displayed.

Hi,

Do you know how to change a root user on the Windows system?

 

Cheers,

Karol

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

583 views 7 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you