LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-11-2010, 02:50 PM   #1
karlochacon
Member
 
Registered: Dec 2006
Posts: 107

Rep: Reputation: 17
-bash: /dev/null: Permission denied and growing size


hi guys

I gotta a Centos 5.0 that suddenly every time I log in I get this
Code:
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
.....
I check the system and
Code:
ls -lh /dev/null
-rw-r--r-- 1 root root 7.8M Jun 11 12:51 /dev/null
and If check a system running OK the permissions and file type are different

Code:
ls -lh /dev/null
crw-rw-rw- 1 root root 1, 3 May  9 00:57 /dev/null
1. what could be the reason that caused this null file change the permissions and file type?
also notice the last modification time is equal to my date and the file is 7MB????

2. How can I get it back to its original file type? for permissions would be chmod 644 but for file type? or Can I copy the file from another server working fine?

thanks a lot

Last edited by karlochacon; 06-11-2010 at 03:01 PM.
 
Old 06-11-2010, 02:59 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
Somebody deleted / moved / overwrote /dev/null. Do (from man null):
Code:
rm /dev/null && mknod -m 666 /dev/null c 1 3 && chown root:root /dev/null
 
Old 06-11-2010, 03:16 PM   #3
karlochacon
Member
 
Registered: Dec 2006
Posts: 107

Original Poster
Rep: Reputation: 17
thanks a lot

you are the man

Last edited by karlochacon; 06-11-2010 at 08:02 PM.
 
Old 06-11-2010, 03:28 PM   #4
karlochacon
Member
 
Registered: Dec 2006
Posts: 107

Original Poster
Rep: Reputation: 17
.....

Last edited by karlochacon; 06-11-2010 at 08:02 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"bash: /dev/null: Permission denied" on Ubuntu Login... sancho Ubuntu 10 10-08-2009 12:38 AM
/dev/null permission denied sagar.1986 Linux - General 4 01-19-2007 04:39 PM
/dev/null: Permission Denied dsschanze Red Hat 3 10-13-2006 02:38 PM
/dev/null: Permission denied phoenix7 Linux - Distributions 1 10-01-2005 07:31 PM
/dev/null: Permission denied LavaDevil94 Linux - Software 2 09-15-2004 12:44 AM


All times are GMT -5. The time now is 02:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration