The /dev/null file has become a regular file Print

  • 0

Symptoms

Outgoing email is failing with an error similar to the following.

2025-12-09 14:07:01 1vT2Ax-0000000AfWK-2pCr failed to expand condition "${perl{discover_sender_information}}" for discover_sender_information router: Undefined subroutine &main::discover_sender_information called at /dev/null line 56.

Restarting the DNS service returns an error similar to the following.

Dec 09 17:18:45 server13.servhost.com.br systemd[1]: /dev/null is not a device.

 

Description

The issue occurs when /dev/null/ is a regular file instead of a character special file.

[root@server ~]cPs# stat /dev/null
  File: /dev/null
  Size: 2891892   	Blocks: 304        IO Block: 4096   regular file
Device: 6h/6d	Inode: 1549451482  Links: 1
Access: (0666/-rw-rw-rw-)  Uid: (    0/    root)   Gid: (    0/    root)

We've opened an internal case for our development team to investigate this further. For reference, the case number is CPANEL-50629. Follow this article to receive an email notification when a solution is published in the product. 

 

Workaround

  1. Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
  2. Move aside the regular file.

    mv -v /dev/null{,.$(date +%s)}
  3. Create the file as a character special file.

    mknod -m 666 /dev/null c 1 3
  4. Ensure that it is owned by root.

    chown root. /dev/null

Was this answer helpful?
Back

Send Message