/dev/null – Permission Denied

Strange enough I found a server today which had permissions set incorrectly for “/dev/null”

Here’s a fix:

ls -l /dev/null
You should see this if everything is correctly
set:
crw-rw-rw- 1 root root 1, 3

If you get a different set of permissions like
this maybe:
-rw-r–r– 1 root root 1, 3

then you should (as root) delete the /dev/null with:
rm /dev/null

and recreate it (as root) again with:
mknod -m 0666 /dev/null c 1 3

Leave a Reply

Your email address will not be published / Required fields are marked *