Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

FN11.1 + Rancher + linuxserver/deluge - "Permission denied" when creating files

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE
Status
Not open for further replies.

SnorreSelmer

Member
Joined
Sep 7, 2011
Messages
58
I've set the container up according to the DockerHub page (https://hub.docker.com/r/linuxserver/deluge/) with a CIFS share. PUID and PGID are set to my FreeNAS user and group ID (1001), so the FreeNAS folder and the container uses the same IDs. I can get a command line in the container and manually create files and folders, but Deluge can't.

Is this possibly related to the mismatch of UID/GID between the FreeNAS/container and the RancherOS VM (Rancher has a UID/GID of 1100)?
 

KrisBee

Neophyte Sage
Joined
Mar 20, 2017
Messages
1,138
Did you resolve this issue? AFAIK the linuxserver container has to run with a UID GID that exists on rancheros. Which means running the container with UID/GID of 1100 as you stated. So you need as CIFS share that recognises a UID/GID of 1100, and check if CIFS share needs to allow root:root to write to it as well.
 
Last edited:

SnorreSelmer

Member
Joined
Sep 7, 2011
Messages
58
I did not, but I'll try this suggestion and see if it helps! :) I'll report back in an hour or so.
 

SnorreSelmer

Member
Joined
Sep 7, 2011
Messages
58
OK, I'm officially confused now...

I used the guide here (https://forums.freenas.org/index.ph...s-11-1-rancheros-docker-rancherui-plex.59963/) to mount CIFS to the RancherOS before, without luck (even deleted the entire VM in frustration).

Today I did the exact same setup, just using UID/GID 1100, and the Deluge daemon wouldn't even start ("no such user on the system"). Figured out how to "edit" a docker service, changed the UID/GID to 1001 like I had in my previous tries, and now everything works perfectly!

Well, it's confirmed working now!
 

KrisBee

Neophyte Sage
Joined
Mar 20, 2017
Messages
1,138
I shouldn't have posted in haste, as it was me who got that one muddled up.

If you run a linuxserver container on linux host they are designed to run with UID/GID that exists on the host system and where local storage is used. So if you ran rancheros non-virtualised, I would expect trying to run a container with UID/GID 1001, for example, to cause problems. Just as I would expect it to cause problems if rancheros is run virtualised and you used storage only within rancheros itself.

If the container runs in Rancheros where the container only reads/writes to CIFS shares then that stricture is lifted and the UID/GID of the running container must surely match that of the username in the CIFS mount. Things can be a bit different if you use NFS mounts within rancheros , which was probably what I was thinking of first time around.
 

SnorreSelmer

Member
Joined
Sep 7, 2011
Messages
58
Yeah. What stumps me is why this didn't work the first time, since as far as I can tell, I set both Dockers up the same way.
Also, I hope to figure out how rancher-nfs works since I have tried and failed to get that to work.
 

KrisBee

Neophyte Sage
Joined
Mar 20, 2017
Messages
1,138
I did use rancher-nfs briefly when looking at rancherUI for the first time. To avoid id mapping troubles between what is a linux nfs client and a FreeBSD nfs server, I had both "Enable NFSv4" and "NFSv3 ownership model for NFSv4" checked on the FreeNAS NFS service. I also set "maproot user" to "root" and "maproot group" to "wheel" on any nfs shares I used.

Example exports:

Code:
root@freenasT:/ # cat /etc/exports
V4: / -sec=sys
/mnt/TestPool/media/music  -alldirs -maproot="root":"wheel" -network 192.168.0.0/24
/mnt/TestPool/VM/docker  -alldirs -maproot="root":"wheel" -network 192.168.0.0/24
root@freenasT:/ #
 
Last edited by a moderator:
Status
Not open for further replies.
Top