Fix for "cannot add user, all the user directories are read-only" issue.

Roger Bamforth
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!
October 23, 2018

I'm not sure if this is the right place to post this as I have answered my own question but I'm writing this in the hope that it might save someone else from wasting a whole day, as I have just done.

I'm evaluating Jira and have been trying to set it up with a MySQL database. I kept getting stuck with the "cannot add user, all the user directories are read-only" error when trying to set it up and create the administrator user. I spent the entire day trying all the fixes I could find on-line with no success. I eventually found the following solution that I haven't seen documented anywhere.

I have been following the instructions here https://confluence.atlassian.com/adminjiraserver073/connecting-jira-applications-to-mysql-861253043.html and at step 2.1 there is a link to go to the MySQL website and download the JDBC Connector/J 5.1 http://dev.mysql.com/downloads/connector/j When you go to this link there is a message saying

"MySQL Connector/J 8.0 is highly recommended for use with MySQL Server 8.0, 5.7, 5.6, and 5.5. Please upgrade to MySQL Connector/J 8.0."

I'm using MySQL 5.7 so, foolishly, I believed this and installed JDBC Connector/J 8.0. This led to me getting the "cannot add user, all the user directories are read-only" error during Jira setup when trying to create the administrator user. After trying the solutions from many  messages online about this problem with no luck I finally went back to the MySQL website, clicked on "Looking for previous GA versions?" and downloaded and installed the old JDBC connector "Connector/J 5.1.47".

I restarted the Jira service and everything worked perfectly after that.

Windows 7
Jira 7.12.1
MySQL 5.7.22
Java 1.8.0_171

7 answers

1 vote
Jonathan Lewis
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!
December 2, 2021

I just resolved this just now at my company with the help of Atlassian support via screen-share.  We lost our old server and database, but had a backup of the database that we restored in a new VM using SQL Server 2019, and using a new install of Jira Data Center on a separate VM. I believe when I set up the new server installation I selected the wrong database schema (we had a custom one for some reason), thus creating several new Jira tables in the database using the default schema(dbo). So despite connecting successfully to our old database after restoring it in SQL Server, it was not loading the correct database tables because of the existence of the duplicate empty dbo schema tables.

I had to manually delete all the empty tables in SQL Management Studio leaving only the custom schema tables our old database required. Make sure the dbconfig.xml was configured properly using the dbowner user credentials and correct schema, using the Jira config tool. Then restart Jira service and it launched successfully with our old database.

Afterwards I performed a re-index inside Jira and everything seems to be back to normal. Hope this helps someone figure out their problem in the future.

Alex Janes
Contributor
April 5, 2022

Sorry for reviving a really old thread.

Working on migrating my cluster to a new deployment, and have been fighting with this for days!!! You are exactly right. It was my dbconfig.xml. I assumed that it would be identical, since I used the same template last time. But lo and behold, my schema selection was wrong.

THANK YOU SO MUCH!!!!!

0 votes
Gregory Kneller
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.
February 14, 2023
0 votes
kenorb January 18, 2021

Cannot add user, all the user directories are read-only.

The error means that your database haven't been properly configured. To do that, all you need to hit the home page first before creating the admin account and follow the redirects (/secure/SetupMode!default.jspa and /secure/SetupDatabase!default.jspa).

Related: https://community.atlassian.com/t5/Jira-Core-questions/java-lang-RuntimeException-javax-servlet-ServletException-java/qaq-p/1580242

0 votes
alberto_delgado
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!
October 4, 2020

I have the same issue with H2 internal database.

0 votes
Lars Vegas
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!
March 19, 2019

Simply use mysql-connector-java-5.1.47 instead of mysql-connector-java-8.0.15

 

Cheers+

Laser

0 votes
Ron Cavallo March 1, 2019

This same problem, "cannot create admin user all user directories are read-only", takes many forms. I

In my case, with Postgres 11 with Jira 8 on MacOS my problem was that I had not separated the atlassian-jira directory out into a place that is owned by the installer.

By moving that directory and properly configuring jira-application-properties and then running startup.sh from the install directory, I was able to get setup to move past this point of "cannot create admin user all user directories are read-only"

This is for my own personal eval install, not for production of course.

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 23, 2018

Hi Roger,

Thanks for reporting this.  I had believed we already updated this documentation to use the more explicit link to the 5.1 jdbc driver, but it appears you found the Jira 7.3.x docs that have not been updated yet.   I will file a request with my documentation team to fix this on all the versions of this document. 

The current doc https://confluence.atlassian.com/display/ADMINJIRASERVER/Connecting+Jira+applications+to+MySQL

Does have the correct link of https://dev.mysql.com/downloads/connector/j/5.1.html

Thanks again

Andy

Roger Bamforth
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!
October 24, 2018

Thanks for your quick reply

 

- Roger

Nancy Dandridge
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!
June 30, 2019

Thanks for this post. It saved me a ton of time and worked beautifully. I'm using Jira 7 and MySql 5.6

Suggest an answer

Log in or Sign up to answer