Dupliact in FreeNAS Jail - User/Permissions

I went ahead and tried my proposal, and it works quite well. Here’s a step-by-step.

  1. 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.

  2. Identify the GIDs of these groups.

    FreeNAS > Accounts > Groups (inspect the groups you identified in Step 1, and write down their GID numbers.

  3. Enter the jail for the plugin (duplicati in this case).

    FreeNAS > Jails > duplicati > " >" > “SHELL”

  4. Inspect the jail’s group file.

    cat /etc/group

  5. 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.

  6. 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.

  1. 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.

  1. Restart the jail.

    FreeNAS > Jails > duplicati (Duplicati jail name. Usually it’s “duplicti”.) Check the checkbox.

Select UPDATE.

  1. If you were in the Duplicati web interface.

    Exit Duplicati and log into it again.