Dupliact in FreeNAS Jail - User/Permissions

I’m also a newbee and have run into similar problems. But I have a different suggestion for a possible solution.

I created 5 directories, and Duplicati’s file browser only sees two. Both have 775 permissions. Two of the other three have 770, and one has 070. The key here is the middle (group) permission: 7.

What I propose is to look up the group for each of the three unseen directories and then add the Duplicati user to those groups.

The only fly in the ointment is that Duplicati is only a user in the jail; it’s not in the base FreeNAS. So one would have to find the group IDs of the directories in FreeNAS, outside the jail, and then:

  1. Check to see if the group id is assigned in the jail. If so, just add Duplicati to the group.
  2. If not, create the group inside the jail and add Duplicati to it.

Does anyone with more experience see any reason why this wouldn’t work? If it works, it seems to be an easier, more elegant solution rather than running Duplicati as root or creating a separate user with the same uid as Duplicati.

ADDED AFTER DEMONSTRATING THE PROOF OF CONCEPT (SEE BELOW)

This approach works quite well and has some major advantages over NugentS’s suggestion of creating a user in FreeNAS with the same UID as Duplicati has in the jail.

By working only in the jail to assign the Duplicati user to the necessary groups, all customization remains in the jail and specific only to Duplicati. If instead you find the Duplicati user’s UID in the jail and then create a Duplicati user with the same UID in FreeNAS or TrueNAS, what happens when you run into the same problem with another plugin, call it FooBar, and it has a FooBar user with the exact same UID? An individual user can have only one UID but many GIDs. Once you assign Duplicati’s UID to the FreeNAS Duplicati user, FreeNAS user FooBar would be out of luck. In contrast, because a user can have multiple GIDs, leave the FreeNAS user list alone and modify the group list in the Duplicati jail.

As a general rule, when customizing jailed plugins it’s best to do the customizations in the jail itself. This makes it much less likely that the customizations will interfere with other plugins or FreeNAS/TrueNAS itself.