0

This server is on Ubuntu 16.04, Linux 4.4.0-142-genericls

Executing ls -la /dev/null after system reboot returns:

srwxr-xr-x 1 root root 0 Feb 18 23:22 null

The correct /dev/null permissions are

crw-rw-rw- 1 root root 1, 3 Feb 18 15:01 null

The "s" means socket type file, the "x" stands for executable.

Sometimes even removing /dev/null with rm /dev/null does not work. I have to create it elsewhere and move it to /dev/null:

mknod -m 0666 /tmp/null c 1 3
mv /tmp/null /dev/null

Many services will not start for the wrong /dev/null, including apache2 and mysql.

This post about Xubuntu 15.10 is saying udev conf and MAKEDEV are the players but I still haven't found how to fix them.

Wrong permissions of /dev/null (XUbuntu 15.10)

slava
  • 3,887
  • The most likely explanation would be that somewhere (such as a service unit definition, a reboot cron job, or an rc.local script) you have a process that's erroneously moving or copying a regular file over /dev/null – steeldriver Feb 21 '19 at 23:40
  • I can't tell exactly what was causing this. It started to happen after a system crash and KVM reset. After several package updates the problem disappeared. – Braconnot_P Mar 02 '19 at 19:30

0 Answers0