Bug #726
/dev/null sometimes becomes invalid
Status:
not-a-bug
Priority:
bug
Assignee:
-
% Done:
0%
Description
Sometimes /dev/null becomes moded 0600, and a regular file (instead of a char device). The solution has been to reboot or run sudo rm /dev/null && sudo mknod -m 0666 /dev/null c 1 3
. This has happened on parabola.nu 3 times, lukeshu.com once, and my own desktop once. Maybe my laptop too.
I have no idea what causes it.
History
Updated by fauno almost 9 years ago
it happened to me once but i don't remember how i solved it... i think it was a script making incorrect use of it?
Updated by fauno almost 9 years ago
a script or program that unlinks the previous file before creating the new, making it a regular file i mean (maybe `tee`?)
Updated by alfplayer about 8 years ago
tramp-sh.el from Emacs Tramp Mode seems to do it.
https://bugs.archlinux.org/task/47912
I noticed the modify times of /dev/null and /home/lukeshu/.emacs.d/tramp are similar.
# stat /dev/null File: '/dev/null' Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 6h/6d Inode: 21510725 Links: 1 Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2016-04-16 22:07:06.006591505 +0100 Modify: 2016-04-16 23:11:08.841395771 +0100 Change: 2016-04-16 23:11:08.841395771 +0100 Birth: - ... # stat ./lukeshu/.emacs.d/tramp File: './lukeshu/.emacs.d/tramp' Size: 1320 Blocks: 8 IO Block: 4096 regular file Device: 801h/2049d Inode: 394831 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1015/ lukeshu) Gid: ( 100/ users) Access: 2014-09-29 00:58:20.237385239 +0100 Modify: 2016-04-16 22:07:05.506598688 +0100 Change: 2016-04-16 22:07:05.506598688 +0100 Birth: - ... # tail -5 tramp ("tmpdir" "/sudo:root@parabola.nu:/tmp") ("touch-t" t) ("touch" "\\touch")) (["scp" nil "sudo" nil nil] nil))