Symbolic Links in /dev of a jail

Frode Nordahl frode at
Sat Sep 9 00:59:55 PDT 2006

On 6. sep. 2006, at 18.03, Anish Mistry wrote:

> Previously posted to -questions:
> 	In my quest to get asterisk+iaxmodem+hylafax working together in a
> jail I've run into one final roadblock.  I can't seem to figure out
> how to create a symbolic link (ln -s doesn't work) in /dev in the
> jail environment while in the jailed environment.   When trying to
> create a link with ln I receive:
> ln -s somedev targetdev
> ln: targetdev: Operation not permitted
> 	Adding a link entry to devfs.conf in the jail fails too since it
> receives the same error.  I can create a link in the jailed /dev from
> the host environment, so there seems to be some restriction on
> creating links in /dev while in the jail.  The reason I need to be
> able to do this is that iaxmodem needs to create a /dev/ttyIAX device
> to point to the correct ttyp* device when it starts in the jail.
> 	Any suggestions would be appreciated.

Have you tried to change the devfs ruleset? Try to boot up a jail  
without any devfs restrictions and see if your devfs.conf alias works  

Search for jail_example_devfs in /etc/defaults/rc.conf, and have a  
look at /etc/defaults/devfs.rules. I guess specifying  
jail_example_devfs_ruleset="" is enough to disable the rules.

If you succeed, you will need to find some way of enforcing rules,  
but allowing what you want. Running a jail without devfs rules gives  
the jail too much access to the system.

Frode Nordahl

More information about the freebsd-stable mailing list