SOLVED Jail mount point charset

ThomasHall

Dabbler
Joined
Jun 5, 2019
Messages
14
I'm trying to use mount points to access 2 FreeNAS SMB shares in my deluge jail. I can mount them just fine by adding them at the mount point page in the GUI, but the issue is that the mounted shares don't display characters like é, å, ü etc. correctly in file names. I've had this issue before, and it has been resolved by using UTF-8 as the charset during the mount. However, since I'm doing it through the GUI I get no options for that. I managed to track down an fstab file residing within the iocage/jail/deluge/ directory, and it gives me these entries:
/mnt/Scratch /mnt/System/iocage/jails/deluge/root/mnt/Scratch nullfs rw 0 0 # Added by iocage on 2019-08-24 09:52:19 /mnt/Downloads /mnt/System/iocage/jails/deluge/root/mnt/Downloads nullfs rw 0 0 # Added by iocage on 2019-08-24 09:52:42
After experimenting a bit with the options and trying to find examples, I was having no luck getting it to accept UTF-8 as the charset though. I tried deleting the lines to see what would happen, and while the mount points in the GUI were gone, the jail would still happily mount the shares as before even after various combinations of stop/start/restart/update of the jail.

So, any advice? Is editing the fstab the right way to go? If so, how do I get the jail to recognize the changes and what should I add to it to make it accept UTF-8 as the charset? If not, what is the correct way to do it?

EDIT:
Okay, nevermind I guess. I removed the mount points with the GUI in case it did something behind the scenes beyond removing the entry from fstab. I then ran the following commands in the FreeNAS shell:
iocage fstab -a deluge "/mnt/Scratch /mnt/Scratch nullfs rw,utf8,iocharset=utf8 0 0" iocage fstab -a deluge "/mnt/Downloads /mnt/Downloads nullfs rw,utf8,iocharset=utf8 0 0"
Still no luck there, but I found some information about vanilla FreeBSD about console language, and decided to give it a shot. Added the following to default in /etc/login.conf:
:charset=UTF-8:\ :lang=en_US.UTF-8:
Ran
cap_mkdb /etc/login.conf
to regenerate it, and then restarted the jail. Voila, the shares now support the extended charset. I don't know if what I did with the mounting is required as well or if it was just the language setting that did the trick, but it doesn't seem to hurt at least.

I'll leave this here in case someone runs into the same problem, but I'm still curious about if this is the right way to go about it.
 
Last edited:
Top