Starting over with a fresh installation... "Can't create or write into the data directory"

Hello all,

I could use some help. Due to a corrupted drive I had a pretty messed up Nextcloud install. Part of it is because I am using an odroid-c2 (so it’s x64), and i originally had owncloud before the switch on very beta software.

Still, was mostly stable for two years.

I decided to start over with a fresh install. I have backups of all my data so it’s not a big deal.

I’ve gotten to the installation wizard, but cannot continue due to this error: “Can’t create or write into the data directory”. When I try to move forward with setting up the new database.

My external drive is mounted in /media. It’s currently formatted BTRFS.

I’ve tried every combo of permissions on the mount location. I’m running apache so the owner is www-data:www-data, I have chmod the mounted folder location 0770, 0775, 0755, none of them work.

I could use some help… I know it’s a simple permission issue. I’ve tried having a folder called data, i’ve tried not having a folder called data… But I am out of ideas.


So where does your ‘datadirectory’ setting in config.php point to?

It doesn’t point to anywhere yet… I haven’t been able to run the install that would setup my config.php. It’s basically blank atm with an instance ID

my nextcloud folder config.php has the owner and group the same as the Nextcloud data folder I’m looking at the IDs right now.