Results 1 to 3 of 3
Thread: Can /dev/null be deleted ??
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
08-07-2008 #1
- Join Date
- Aug 2008
- Posts
- 2
Can /dev/null be deleted ??
I am not sure how and we don't want to reboot since it involves downtime...
the issue is lot of scripts don't work becos of it. When we login we get the following error.
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
Any suggestions, how to fix it without reboot and any idea how it was deleted. We have checked history and it doesn't tell us much.
-
08-07-2008 #2First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org
-
08-07-2008 #3
- Join Date
- Aug 2008
- Posts
- 2
Looks like somebody has tried to do something like "> /dev/null"
without the device actually existing - looking at the file contents will
probably give a hint as to how it happened...
ls -ltr /dev/null
shows it to be a regular file.
To correct it, I removed /dev/null, and re-create it with:
mknod -m 666 /dev/null c 1 3
i.e a character device, major/minor pair of 1,3, and world-writable.
That resolved the issue.