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.