New setup, nc-fix-permissions not working

Hi

Ran into some trouble with my nextcloudpi. Could not update anymore. So I decided to start from scratch/from a fresh image. Wrote NextCloudPi_RPi_03-28-20 to a new micro-SD and put it into my Rpi 3B+. Plugged in a new USB stick and formatted with nc-format-USB and mounted with nc-automount:
$ mount |grep myCloudDrive
/dev/sda1 on /media/myCloudDrive type btrfs (rw,nosuid,nodev,relatime,space_cache,subvolid=5,subvol=/,uhelper=udisks2)

so looks fine to me. Then ran nc-database and nc-datadir to point to ncdata(base) on the stick. Next, made a copy of both directories just in case, e.g.
$ cd /media/myCloudDrive
$ sudo cp ncdata bkp_ncdata
Then, turn on maintenance mode and cp -r the old datadir and database from the backup into the new location (not deleting the new stuff, is that wrong?).
From this point, I can’t access the wegGUI anymore (“Internal Server Error”).
So now I run nc-fix-permissions. But this gives the error:

“data directory not found”

Which is bad, because the directory is there. Also:
$ sudo grep datadir /var/www/nextcloud/config/config.php
‘datadirectory’ => ‘/media/myCloudDrive/ncdata’,

So I thought, maybe there’s something wrong with the old datadir. So just to confirm, I mv back my backup of the fresh datadir:
$ sudo mv bkp_ncdata ncdata
And then run nc-fix-permissions. But now I still get:
“data directory not found”

Now I’m very confused. Am I doing anything stupid? Can anyone help? Thanks!

Hi
tried again, this time ncdata only. That worked better, it did not kill the WebGUI. nc-fix-permissions still did not work. However,

$ sudo chown -R www-data:www-data /media/myCloudDrive/ncdata

helped. Afterwards, nc-fix-permissions worked. I thought that’s what nc-fix-permissions is all about…
This text will be hidden
No success with the database, though, I guess this one’s broken.

1 Like