Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Sep 2006 09:59:51 +0200
From:      Frode Nordahl <frode@nordahl.net>
To:        Anish Mistry <mistry.7@osu.edu>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Symbolic Links in /dev of a jail
Message-ID:  <8D30721C-9EAA-4518-9376-93082E8CB727@nordahl.net>
In-Reply-To: <200609061203.43058.mistry.7@osu.edu>
References:  <200609061203.43058.mistry.7@osu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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  
then.

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






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8D30721C-9EAA-4518-9376-93082E8CB727>