[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dev/null only root access - why?



On 2009-09-22 21:23 +0200, Emanoil Kotsev wrote:

> Why does dev/null has rw permissions only for root?
>
> ls -al /dev/null
> -rw-r--r-- 1 root root 0 22 сеп 21,09 /dev/null

This can happen if some program, e.g. an early init script, writes to
/dev/null before the device node for it is created.  In this case,
redirection (foobar > /dev/null) will create it as a regular file.

> Where do you fix this?

I don't really have an explanation or a solution.  To debug the problem,
reboot with init=/bin/bash added to the kernel command line and run the
scripts in /etc/rcS.d, one at a time (/etc/rcS.d/Swhatever start).
Check /dev/null after each script.

Sven


Reply to: