I went ahead and tried my proposal, and it works quite well. Here’s a step-by-step.
-
Identify the groups to which the directories you want to backup belong.
FreeNAS > Storage > {dataset you want to backup} > : (3 dots) > {Edit Permissions or Edit ACL}. Copy (write down) the group name from the Group field in the file information.
-
Identify the GIDs of these groups.
FreeNAS > Accounts > Groups (inspect the groups you identified in Step 1, and write down their GID numbers.
-
Enter the jail for the plugin (duplicati in this case).
FreeNAS > Jails > duplicati > " >" > “SHELL”
-
Inspect the jail’s group file.
cat /etc/group
-
In the output from Step #4, look for any of the groups you identified in Step #1. There will be four possibilities:
a) Most likely, the group names and GIDs are not assigned to any groups in the jail. If so, add them as described in Steps #6 & 7, below.
b) There’s a group in the jail with the same name and GID as you found in Steps #1 & 2. If so, you don’t need to do Step #6 for such groups.
c) There’s a group in the jail with the same GID as you found in Step #2 but a different name. If so, don’t bother with Step #6 and assign duplicati to this group when you get to Step #7 below.
d) There’s a group in the jail with the same name as you found in Step #1 but a different GID. If so and you didn’t find another group with this GID in Step #5.c, in Step #6 create a group with a unique name and the GID you found in Step #2. In Step #7, assign duplicati to this new group.
-
Add the missing groups to the jail.
pw groupadd -n GROUP -g GID
where GROUP is the case-sensitive name of the group you identified in Step #1, and GID is the corresponding group ID you identified in Step #2. Do this for every group you identified in Steps #1, 2, & 5.
-
Add duplicati to each of these groups.
pw groupmod GROUP -m duplicati
You might want to check that duplicati is an actual user in the jail. (cat /etc/passwd
).
Here GROUP is one of the group names you identified in Step #1, bearing in mind the details in Step #5.
See Joshua Parker Reuhlig’s post, “[How-To] Giving Plugins Write Permission to Your Data” for more on adding groups and users in a jail.
-
Restart the jail.
FreeNAS > Jails > duplicati (Duplicati jail name. Usually it’s “duplicti”.) Check the checkbox.
Select UPDATE.
-
If you were in the Duplicati web interface.
Exit Duplicati and log into it again.