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 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?

@m4iler @cstanhope I did. Not having the permissions applied was my first thought. I could then access the folder within my file browser, but I still couldn’t access it by my backup.

Hmmmm I wonder if my backup tool is running as a different user...

@kev @m4iler Okay. I just wanted to check the obvious. I've bumped into group permission problems more times than I'd like to admit. :)

@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 @ataraxia937 what about the directories underneath that? I've seen so many people do "chown foouser /foo/bar/baz" when "bar" isn't +rx to foouser either.

(I know you've probably checked that, but want to be sure :p)

@gwmngilfen @ataraxia937 yep, I used -R to recursively dig though. I sorted it now. It was the backup application, not my permissions.

@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?

Remember that copying the data folder is not enough to back up your #nextcloud data. You need to also copy the SQL/MariaDB data base and some other things.

See the docs:

@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).

Sign in to participate in the conversation

Fosstodon is a Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.