Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Error "Cannot create or write into the data directory"

Featured Replies

Error "Cannot create or write into the data directory" 

 

I can not get around this error, it does not matter if I try and install NextCloud, or any other App that requires a database to be created.

 

Be it MariaDB or Postgresql. 

 

I have changed directories, owners, permissions and everything I can think of. 

 

I have installed UnRAID Version 6.11.5 2022-11-20. 

 

I even went so far as to run "New Config" and still the same problem

 

I like the UnRAID interface, and if possible not go back to TrueNAS.

 

Any help would be appreciated. 

Edited by LyndochAVs

  • Author

When I go to the WebUI for the first time after installing an app. 

 

The app askes to create an administrator account and you configure the Database for the first time,

 

I get the error Cannot create or write into the data directory

 

I have tried different directories, giving full permissions to the 'user' of that directory and still luck.

 

I've printed off the entire UnRAID user manual that is available online and I must admit it is very brief and obviously assume a mass of prior knowledge that I just don't have right now. 

 

 

  • 2 weeks later...

Are you specifying "LOCALHOST" or the IP address of the server?

 

LOCALHOST within a container does not mean the server's IP.  It refers to the IP of the container itself.  You would need to specify the IP address of the server and the port you've specified for the database

 

FWIW, I just installed Nextcloud and MariaDB (both from LSIO) with no apparent ill effects and no logged message like what you're seeing....

  • Author

I installed Docker elsewhere, and I am getting the same problem even when using the database ip and not the server ip. 

 

Thank you for your help, but I think I will go use another platform that I know works for me, and forget about Unraid.

  • 3 months later...

I have the same problem. 

  • 1 month later...

Hope this can help anyone else with the same problem...

 

When you create the docker you set the location of your files in "User Files"

image.png.0a21dd32c9a62dcd214bb495d1dd1ca0.png

Note that the container is going to access this path through /var/www/html/data .

When you are setupping the account you are now asked where to add the Data folder:

image.png.0284f96dc69fc33089a385b220200994.png

If you change this path you will not point to the data folder you defined earlier, this will cause the interface to issue the message you are seeing.

 

PS: Other problems may cause the same, but I dare to say this is a common mistake.

  • 3 months later...

Thank you very much. That helped me. I was changing the path of the Data folder to the path given in Unraid, in my case /mnt/cache_nvme/appdata/postgresql15.

I was making that common mistake you speak of. This time I left the data folder path as /var/www/html/data put the address of the server 10.0.0.7:5432 and I am in business.

On 9/9/2023 at 7:47 PM, JoeArny said:

Hope this can help anyone else with the same problem...

 

When you create the docker you set the location of your files in "User Files"

image.png.0a21dd32c9a62dcd214bb495d1dd1ca0.png

Note that the container is going to access this path through /var/www/html/data .

When you are setupping the account you are now asked where to add the Data folder:

image.png.0284f96dc69fc33089a385b220200994.png

If you change this path you will not point to the data folder you defined earlier, this will cause the interface to issue the message you are seeing.

 

PS: Other problems may cause the same, but I dare to say this is a common mistake.

 

Just wanted to say thank you! I had the same issue and this fixedx it.

  • 3 months later...
On 9/10/2023 at 3:47 AM, JoeArny said:

Hope this can help anyone else with the same problem...

 

When you create the docker you set the location of your files in "User Files"

image.png.0a21dd32c9a62dcd214bb495d1dd1ca0.png

Note that the container is going to access this path through /var/www/html/data .

When you are setupping the account you are now asked where to add the Data folder:

image.png.0284f96dc69fc33089a385b220200994.png

If you change this path you will not point to the data folder you defined earlier, this will cause the interface to issue the message you are seeing.

 

PS: Other problems may cause the same, but I dare to say this is a common mistake.

Thanks for the advice. This was driving me crazy. All fixed.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.