[volunteers] Why you are careful about /dev/null operations as the root user
kevin.dankwardt at gmail.com
Thu Dec 17 08:02:04 PST 2015
I have found that the benefit of systemd-nspawn binding mounting/umounting
dev,sys,proc handy. Plus when I remove the directory afterwards I don't
have to make sure I umounted the bind mounts. I've killed a machine a
couple of times already because I forgot to undo the bind mount before
doing a rm -rf on a directory I had been using for chroot.
Also in a related question. Do any filesystems have a "null directory"? I
have an app that wants a directory to write things into that I don't need
so I'd like to give it a directory that acts like /dev/null. It accepts
creates and writes and just never stores anything.
On Wed, Dec 16, 2015 at 10:51 PM, Rick Moen <rick at linuxmafia.com> wrote:
> I wrote:
> > You know, I _should_ have figured that part out, too, because I was
> > seeing the StartTLS failures in real time as I test-processed Exim's
> > queue maually -- but I didn't investigate. Moreover, I was fixated on
> > the horrificness of /dev/null being suddenly wrong that I cd'd into the
> > chroot's /dev and _didn't look around_.
> Just musing about the above: The thing is, normally it'd never occur to
> a Linux user that /dev might have only a single file in it, because --
> normally -- such a system would fall over immediately. Heck, it
> wouldn't even boot.
> list.svlug.org running in a chroot makes it a special case, where the
> surrounding system furnished a fully populated /dev right up to the
> chroot'ing, and then the migrated system's processes stumbled forward
> with the (empty) /dev inside the chroot, creating problems for processes
> but not dire enough to bring the system down.
> So, I still feel a _little_ sheepish about failing to notice the
> chroot's /dev being totally empty, as normally that can't happen without
> much worse consequences.
> volunteers mailing list
> volunteers at lists.svlug.org
visit www.kcomputing.com for the best in Linux developer training.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the volunteers