Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Jan 2007 17:05:08 +0100
From:      "Michael Grant" <mg-fbsd3@grant.org>
To:        "FreeBSD Questions" <freebsd-questions@freebsd.org>
Subject:   /dev/null in a chroot
Message-ID:  <62b856460701070805l2e557025l89d40e7b53ec59c@mail.gmail.com>
In-Reply-To: <62b856460701070753p62a3c531g63f08b164d23e6eb@mail.gmail.com>
References:  <62b856460701070753p62a3c531g63f08b164d23e6eb@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I chrooted apache to /www.

In order to run a java program from a web page, java needs a /dev/null
inside the chroot.

I don't want to create another whole /dev/ dir with all the disk raw
devices there to be read for anyone who cracks root.  I just want a
/www/dev/null file.

I tried creating a node with mknod exactly like the node in /dev but
it doesn't work in freebsd 6.  /dev/ is special now and you can't just
create nodes anywhere like the old days.

Is there a way to create a /www/dev/null which acts just like /dev/null?

Michael Grant



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?62b856460701070805l2e557025l89d40e7b53ec59c>