Support intro
Sorry to hear you’re facing problems ![]()
help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.
In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:
example
Or for longer, use three backticks above and below the code snippet:
longer
example
here
Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can ![]()
Nextcloud version (eg, 29.0.5): 27
Operating system and version (eg, Ubuntu 29.04): Debian Stable
Apache or nginx version (eg, Apache 2.4.25): 2.4.59
PHP version (eg, 8.3): 8.2
The issue you are facing:
After following the documentaiton for migrating from one instance to another I am running into an error with the .ocdata file that seems to be a permission error.
"Your data directory is invalid. Ensure there is a file called “.ocdata” in the root of the data directory. Cannot create “data” directory. This can usually be fixed by giving the web server write access to the root directory. See Introduction — Nextcloud latest Administration Manual latest documentation "
my data directory is located in /home/user/data
my nextcloud directory is located in /var/www/html/nextcloud
This was the same config as my previous install. In fact, to do the migration i put nextcloud in maintenance mode, copied the entire nextcloud and data directories, dumped the database, and moved everything over to the new install.
The .ocdata file is present in /data, I granted ownership to both the /nextcloud and /data folders to www-data and I did chmod 770 to the /data folder
However when i do
“sudo -u www-data touch /home/user/data/.ocdata”
I get a permission denied error still.
I tried chmod 777 just in case and had the same effect.
I assume I just forgot a step somewhere. Any help is appreciated.
Searching this error on the forums seems to indicate this is mostly a problem with people using remote storage. But my issue is occurring on a vanilla install on the same local hard drive as the OS.