mount fdescfs in iocage

oljas

Cadet
Joined
Oct 8, 2016
Messages
5
I am running samba DC in jail. Trying to upgrade to samba416.
Samba 4.16 tries to mount fdescfs in /var/run/samba/fd and fails.

Code:
# mount -t fdescfs -o nodup none /var/run/samba4/fd/
mount: none: Operation not permitted


Is there any way to allow mounting fdescfs in iocage?
 

ScruffyDan

Cadet
Joined
Oct 30, 2022
Messages
1
I went through troubleshooting this on Vanilla FreeBSD using Bastille for Jails. This is what worked for me:

- Change the following in the jail.conf for your Samba jail
enforce_statfs = 2; to enforce_statfs = 1;

- Add the following to to jail.conf
allow.mount;
allow.mount.fdescfs;

Not sure how to achieve this in TrueNAS but this should hopefully point you in the right directions
 

oljas

Cadet
Joined
Oct 8, 2016
Messages
5
I went through troubleshooting this on Vanilla FreeBSD using Bastille for Jails. This is what worked for me:

- Change the following in the jail.conf for your Samba jail
enforce_statfs = 2; to enforce_statfs = 1;

- Add the following to to jail.conf
allow.mount;
allow.mount.fdescfs;

Not sure how to achieve this in TrueNAS but this should hopefully point you in the right directions
Thanks, that is very helpful. Unfortunately iocage does not have an option to allow mount fdescfs. And according to this comment by Kris Moore, there is no plans in foreseeable future. I gues, I have to move to generic jails instead of iocage then. :frown:
 

Gogomobile

Cadet
Joined
May 4, 2017
Messages
3
Hi, I run a Samba AD DC in jail as well. Current OS: TrueNAS-13.0-U4 + Samba 4.16.8.
Came across a documentation from IOCAGE 1.2 describing how run Debian Buster in Jail. So here is what I did :
1.) under sysrc / Tunables: linux_enable="YES"
2.) edit iocage fstab and add the following: "fdescfs /var/run/samba4/fd fdescfs rw,linrdlnk 0 0"

Start jail and boom.., jail message log warning >> cannot mount fdescfs gone..!!
The thing is, I'm not experience enough to tell if this solves the problem, .. any insights will be much appreciated, Thanks.. :smile:

BigNote: Warning..!! Don't run the jail with nodup parameter..!! The system will deleted all the files under /var/db/samba4 ( I did a snapshot b4 trying it out ).
 
Top