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.
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.
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).
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.
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.
Does have the correct link of https://dev.mysql.com/downloads/connector/j/5.1.html
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events