Home > Linux > /dev/null - Permission Denied

/dev/null - Permission Denied

September 10th, 2007 Leave a comment Go to comments

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

Categories: Linux Tags:
  1. No comments yet.
  1. No trackbacks yet.