Solving /dev/null permission problem

Getting error message in Ubuntu 9.04 when trying to sftp:

Couldn't open /dev/null: Permission denied

The reason is the null got replaced by some other process with wrong permission. A temp fix is

sudo rm /dev/null*
sudo mknod --mode=666 /dev/null c 1 3

The problem however will come back after rebooting the system. A fix that works for me is to search /etc/rc*.d for file S*udev and remove it (in my case S10udev in /etc/rcS.d). Basically the problem is from sysadmin error causing udev to be run multiple times in the boot sequence.

references: 1, 2.

Leave a Comment

Before leaving a comment, please ensure you have read and understand my comments policy and my privacy policy. Any comment that does not abide by the comment policy will be deleted immediately.

Related Posts