change permissions on /dev/null

Simon Geard delgarde at
Tue Aug 16 04:09:09 PDT 2005

On Mon, 2005-08-15 at 20:53 +0100, Donal Farrell wrote:
> Hi there. How do I cg=hange permissions or use mknod to make /dev/null
> back into a charcter device? 
> donal at linux:~> ls -la /dev/{null,zero}
> -rw-r--r--  1 root root  117 2005-08-15 20:50 /dev/null
> crw-rw-rw-  1 root root 1, 5 2004-04-06 14:27 /dev/zero

Looks like something has tried to do something like "> /dev/null"
without the device actually existing - looking at the file contents will
probably give a hint as to how it happened...

To correct it, remove /dev/null, and re-create it with:

mknod -m 666 /dev/null c 1 3

I.e a character device, major/minor pair of 1,3, and world-writable.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the blfs-support mailing list