Ok folks, I need your help. I know you’re gonna say I’m dumb and I’m missing something obvious, but it is what it is.
I’m trying to backup my #nextcloud data folder to B2 using Duplicati, but my user can’t access the data folder without sudo (www-data owns it). I’ve added my user to the www-data group, but still no joy.
What am I missing, folks? I either need to run my backups as sudo, or get access to the data folder without trashing NC permissions. Thanks all!
@kev Did you log out and log back after adding your user to the www-data group?
@kev Does the group www-data actually have read access? As opposed to just being listed as the folder's group?
@ataraxia937 yep. I chown/chmod to that user/group as part of the Nextcloud setup.
@kev What do the perks on the files/dir look like? Does the group have access (at least read and execute)?
@kev are you sure Duplicati isn't using a different session?
@kev use ACL (https://wiki.archlinux.org/index.php/Access_Control_Lists) to add your user to the NC data directory. It is very simple to use.
@Billie I have no interest in backing up the database. I’m just interested in backing up the raw files. Thanks for the info though.
The sudo on my system (by default) did some funny stuff, but I've had better success by actually using sudo -s and running things that way. Is that an option?
Nevermind, I reread and you say it works with sudo; you were trying to do it without that. Sorry!
@kev A couple of things I can think of off the top of my head - have you logged off and on after adding your user to www-data group, is the data directory set to mode 700, is there a directory further up the path which your user can't access (eg if data dir is /var/www/nextcloud/data cd to /var, then /var/www in turn in case any of those are too restrictive to access).
Fosstodon is a Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.