Severe error with vanilla install of Confluence 5.10.3 on Linux
Asked by John Norman:

*This question is in reference to Atlassian Documentation: [Installing Confluence on Linux](https://confluence.atlassian.com/pages/viewpage.action?pageId=143556824)*

After a vanilla install as root, the catalina.out log says:

09-Aug-2016 00:54:06.754 SEVERE \[Standalone-startStop-1\] org.apache.catalina.startup.HostConfig.beforeStart Unable to create directory for deployment: /opt/atlassian/confluence/conf/Standalone/localhost

Pretty terrible "out of the box" experience.


Answers:
author: Roman Kirilenko
body: Hi!

I had similar issues with Atlassian installers. We can discuss a lot why we got those issues and what Atlassian should do with their installers... But I just fixed permissions to make the application work.

You need to change the owner of /opt/atlassian/confluence to OS user that starts this application (usually confluence).

Something like

```
#Let's change the owner of /opt/atlassian/confluence to confluence recursivelychown -R confluence /opt/atlassian/confluence#Just in case - let's change the owner of Confluence home directory toochown -R confluence /var/atlassian/application-data/confluence
```

should help. You also need to restart your Confluence instance after that.

Of course, it's obvious, but it helps in most cases.


author: Steve Behnke [DiscoverEquip.com]
body: I've never experienced this on a vanilla install after years of installing these applications for clients --

* Application was installed as non-root by mistake
* Application was ran it under a different user by mistake
* Application was installed from an archive and permissions \& ownership weren't configured properly

Some more information about your host OS or further logging could assist.


author: John Norman
body: No, no, a thousand times no.

You can certain predict the behavior of mainstream distros. It's RedHat / Centos.

It should be created by the install script -- which as I said, following the docs, I ran as root.

comments: author: Nic Brough -Adaptavist-
body: Yes, you can predict certain types, but the assumption that they will always work for others is utterly utterly wrong (The three machines I'm looking at in my answer were not RedHat based, and never will be)

As you're on RH/Centos, then you're in a good place as the installation script does work for that off-the-shelf. You've almost certainly run into one of the three things @Steve Behnke \[DiscoverEquip.com\] mentions


author: Nic Brough -Adaptavist-
body: You can't predict every single possible configuration of every machine out there. That error implies that there's permission settings in the OS that is preventing the start up. Some Linux distributions would allow a normal user to write stuff to /opt, others won't. I have to change SELinux settings on one of my machines to install it, fiddle with permissions on a second, and edit the init script on a third if I want it to start correctly.

Check that you're running the service with the right user and that user owns, and has full read/write to, both the home and installation directories. I suspect you're going to find running it initally as root has changed ownerships.


Tags: confluence-administration

documentation