Backup error with NCP docker

I have a NCP Docker container on my raspberry pi 4 and a external HDD connected to it. All runs smoothly so far.
The “data” folder is mapped to my pi, so i can create create and copy folders from via ssh from inside the container with no problem.

I tried to use the backup function to secure my data on another external HDD. I created a folder “backup” inside the mapped data folder and set the destination directory to


and it says path exists.

When clicking once the apply button it results in:

nc-backup write error

When i repeat clicking on apply i get:

Unauthorized request. Try reloading the page

What could be the reason for this error and how can I create a backupfile of NCP + Data?

Thanks for your support!

could you check the permissions and owner of

and the use the correct permissions-button of ncp- webgui?

hints to a passwordproblem… have you logged in as your ncp-webuser (mostly that’s ncp)?

I have

sudo chown www-data:www-data /media/storage/nextcloud/backup

which leads to

ls -ld /media/storage/nextcloud/backup
with the result:
drwxr-xr-x 2 www-data www-data 4096 Apr 6 16:04 /media/storage/nextcloud/backup

So i guess the folder permissions should’nt be a problem?

When changing from Nextcloud UI to the ncp-webgui I logged in with ncp account. I cannot remember to have set up more than 2 user up to now (ncp, privateUser) and I guess i would’t be able to login with another that is not admin into ncp-webgui.

ummmm… note that the nc-admin isn’t neccessarily the ncp-webui-admin. these are 2 different “users” - not connected to another.

so if you’d try to login on webgui using nc-admin… it won’t work. and vice versa.

Yes, i have one login for “using” nextcloud, and another for ncp settings. As you said, I cannot login for instance into ncp settings with the “nextcloud user”.

To my knowledge there are no other users…

I have reset all permisions and

sudo chown www-data:www-date /media/storage/nextcloud

instead of

sudo chown www-data:www-date /media/storage/nextcloud/backup

and it seems to work now.
Maybe, for some reason, ncp needs permissions to the parent folder as well… ?

Anyway, it does create backups now!

ummm i thought it was clear that all files on that folder - even those in subfolders - would be need to be owned by www-data:www-data - and thus you usually should enter a command like chown here with -R (recursive) - which would go down to the latest files in the most hidden subfolders…

so please keep that somewhere in your mind
sudo chown -R "www-data:www-data" /media/storage/nextcloud

(same with chmod)

but good that you found the problem and solved it, finally :slight_smile: