Cannot create or write into data directory

I get the error:
Can’t create or write into the data directory /var/nextcloud/data

I’ve followed the instructions here:

Here is the relevant commands I used:
sudo mkdir -p /var/nextcloud/data
sudo chown www-data:www-data /var/nextcloud/data
sudo chmod 750 /var/nextcloud/data

After I do this I mount a Ext4 partition.
Restart system.

Then when I try to setup NextCloud I get the error in the screenshot.

Any suggestions? I’ve run out of ideas.

@noblestwolf Greetings whizzy wolf of virtual nights.


Hope this helps.

Hi @noblestwolf

Learning this “mount” endeavour I would forward my full pack to the wolf pack as a humble gesture of peace …

Please consult the documentation:

Stick to the more known Un*x flavours. Naturally, you can choose Ubuntu, CentOS, FreeBSD, ArchLinux and probably NextCloudPi or other flavours besides Debian Linux. Also available are some other OS …

Happy hacking.

Your are welcome.

BTW a kind gesture like problem solved (i.e. :white_check_mark:) or a little ACK to one or more of my comments (i.e. click on the heart icon :heart:) would show you are satisfied. This could be a kind gesture and would motivate me like authors of other advice to continue in lending a hand freely…

Please think first, act second only and always have the protection of your data in mind.

Thank you for pointing the outdated docs out.

1 Like

I’m not following what you mean here…

1 Like

Oh sorry.

Just joking and play of words. This is called a ‘banter’ in British English, I presume.


The intended meaning was:

Let me present you (noblest wolf and friends i.e. the “wolf pack” :wolf: :wolf: :wolf:) my complete set of document links (the “full pack” :books:).

Happy hacking.