Jump to content

/var/run errors


Uiler
 Share

Recommended Posts

Hi

 

Recently, every time I boot up I get error messages like

 

/etc/rc.d/rc line 94: /var/run/runlevel.dir : permission denied

 

and

 

cannot remove /var/run/netreport

/var/run/runlevel.dir: permission denied

 

Sometimes the computer even refuses to boot after this or won't start X.

 

I went to /var/run and did an ls. Even though I was root I get the message back:

 

ls: netreport: Permission denied

ls: runlevel.dir: Permission denied

 

Anyone have any idea what's going on?

Link to comment
Share on other sites

Looks like a runlevel problem :? Im guessing.

Open up a term as root, then do

 vi /etc/rc.d/rc

have a look at line 94, should say something like this,

# Tell linuxconf what runlevel we are in

[ -d /var/run ] && echo "/etc/rc$runlevel.d" > /var/run/runlevel.dir

Link to comment
Share on other sites

Hi!

 

Thanks for the suggestion. However I had a look at line 94 and it is exactly the same as what you wrote so the problem might not be with that file. If it helps here are the permissions of the rc file:

 

-rwxr-xr-x 1 root root 4266 Mar 13 07:37 rc*

 

I hope that's normal.

 

I'm not sure a runlevel problem would explain why I can't even ls /var/run/netreport or /var/run/runlevel.dir though. The fact that ls is failing is extremely worrying.

Link to comment
Share on other sites

it would seem the permissions on those two files are incorrect.

 

try:

chmod u+r /var/run/netreport

and do the same for runlevel.dir

 

see if ls works then...you may also what to do it with +x and possibly +w, but i'm not at my box so i'm not sure what the correct permission for those files is...

Link to comment
Share on other sites

Those permissions look fine to me (sorry tyme)

 

" netreport tells the network management scripts to send a SIGIO signal

to the process which called netreport when any network interface status

changes occur."

My /var/run/netreport folder is empty. Maybe you could look at the netreprt file with vi

see whats in there.

Link to comment
Share on other sites

it would seem the permissions on those two files are incorrect.

 

try:

chmod u+r /var/run/netreport

and do the same for runlevel.dir

 

see if ls works then...you may also what to do it with +x and possibly +w, but i'm not at my box so i'm not sure what the correct permission for those files is...

 

Hi!

 

Unfortunately when I try to use chmod I get the following error message:

 

chmod: failed to get attributes of `/var/run/netreport': Permission denied

 

In reply to anon, I've tried using emacs to look at netreport. All it does is create a new file called netreport.

Link to comment
Share on other sites

OK, try looking inside it this way, click on K (start) , Applications, File tools, File manager_ superuser mode.

Enter root password in pop up box, then navigate to the folder.

Link to comment
Share on other sites

you need to run that chmod command as root

 

in the console, type su press enter, put in your root password, and then try to do the chmod command. (my apologies for not specifying this)

Link to comment
Share on other sites

you need to run that chmod command as root

 

in the console, type su press enter, put in your root password, and then try to do the chmod command.  (my apologies for not specifying this)

 

Unfortunately, I was root when I did the chmod command.

Link to comment
Share on other sites

OK, try looking inside it this way, click on K (start)  , Applications, File tools, File manager_ superuser mode.

Enter root password in pop up box, then navigate to the folder.

 

Unfortunately I tried that in the past (well actually starting konqueror from the console where I was logged in as root, but it's the same thing really). However I can't see netreport or runlevel.dir at all in the directory (even with hidden files on). In the console it says:

 

WARNING: lstat didn't work on netreport

WARNING: lstat didn't work on runlevel.dir

WARNING: lstat didn't work on xfs.pid

 

Wait a moment. xfs.pid was fine before. (Checks previous output). Yup last time I did an ls on /var/run xfs.pid showed up fine. Yikes I just did another ls on /var/run and ls seems to be unable to see xfs.pid as well now.

 

Wah! Things seem to be getting worse by the minute!!!!!

Link to comment
Share on other sites

well then! let's try another trick, shall we?

 

chown root:root /var/run/netreport

and the same for runlevel.dir

 

again, i'm not sure if these are the correct permissions for these files...i'd have to double check when I get home, but I'd think such files would need to be root owned...

Link to comment
Share on other sites

Don't think the files permissions is the problem, mine are the same and i can view / edit them.

Try looking at the files in run level 3.

Reboot, and at the lilio menu press the ESC key, then type, linux 3

Enter root and root password at the promt to login.

Then use vi or whatever you prefer to view /edit the files.

 

If your not sure how to get out of that level, then either type reboot, or startx

Link to comment
Share on other sites

I've found the solution to the problem. Booting into Knoppix I ran reiserfschk. Basically it said I had 2 fatal corruptions on my root partition and 1 on my home partition. These had to be fixed using --rebuildtree. I did this and the problem is now gone (and a good deal of the instability I had been experiencing is gone too). That's the good news. However I had memories of seeing bad sectors when formatting my HD a few months ago.

 

Booting into windows I ran Norton's Disk scanner. It didn't find any new bad blocks on the FAT32 partitions this time, but I was suprised at the number of bad blocks there were already. There must have been a dozen or more bad blocks on the FAT32 partitions. And of course I am now starting to discover "fatal corruptions" on my reiserfs partitions.

 

So is it safe to continue using this HD, or is this a sign of a dying HD?

Link to comment
Share on other sites

Personally, i would not be happy with that many bad blocks on my H/D

The drive might last a few more years, but if it were mine, i would change it.

 

Glad you got the other prob fixed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...