Date: Mon, 23 Feb 2009 22:32:28 -0900 From: Mel <fbsd.questions@rachie.is-a-geek.net> To: freebsd-questions@freebsd.org Subject: Re: Accessing /dev/lpt0 in a Jail Message-ID: <200902232232.28985.fbsd.questions@rachie.is-a-geek.net> In-Reply-To: <8F3ADB585FA04899A147599EACBCBAE3@atlantis> References: <9F3E5C98058140F697CA8A46F31C6A4D@atlantis> <49A1EC64.3000703@datapipe.com> <8F3ADB585FA04899A147599EACBCBAE3@atlantis>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 23 February 2009 12:32:39 Jasvinder S. Bahra wrote: > [root@pearl ~]# ls -al /dev/lpt* > crw------- 1 root wheel 0, 53 Feb 23 21:11 /dev/lpt0 > crw------- 1 root wheel 0, 54 Feb 23 21:11 /dev/lpt0.ctl > > I need the device nodes to have 0660 permissions and root:cups ownership. > I can easily make these changes using the chown and chmod tools, but the > changes do not survive a system reboot. Following some further research, I > understand I can make these changes occur automatically by adding some > entries in the jail's /etc/devfs.conf file... You should repeat this to yourself, about 10-20 times, daily, so you don't forget ;) devfs.conf is for devices available at boot time, but devfs.rules rule after Ergo, making changes to devfs.conf does nothing till the next boot. > I also tried creating a device ruleset in the jail (i.e. creating a > /etc/devfs.rules file in the jail)... > > [localrules=5] > add path 'lpt*' mode 0660 group cups > > ...and then applying that ruleset by adding the following to the jail's > /etc/rc.conf Prisoners don't get to decide which doors are opened. Thus, devfs_* is completely ignored inside prison walls. The host sets up the ${JAIL_ROOT}/dev. In the hosts /etc/devfs.rules, you can set: [devfsrules_jail_pearl=5] add include $devfsrules_hide_all add include $devfsrules_unhide_basic add include $devfsrules_unhide_login add path 'lpt*' mode 0660 group cups unhide Then add to /etc/rc.conf: jail_pearl_devfs_ruleset="devfsrules_jail_pearl" Inform with ezjail author how to make this ez ;) -- Mel Problem with today's modular software: they start with the modules and never get to the software part.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902232232.28985.fbsd.questions>