Koozali.org: home of the SME Server

/var/log not a directory anymore

Meert

/var/log not a directory anymore
« on: April 20, 2003, 02:41:03 PM »
My /var/log is not a directory anymore but a 44720k file!
How do I fix this problem? Can I just delete the file and recreate a /log directory?
Could this also be the reason why I can't view my log files through the server manager panel?

Regards,

Meert

Chris

Re: /var/log not a directory anymore
« Reply #1 on: April 20, 2003, 05:29:49 PM »
Could this also be the reason why I can't view my log files through the server manager panel?

Yes

I would rename the file and then recreate the directory

Meert

Re: /var/log not a directory anymore
« Reply #2 on: April 20, 2003, 11:40:33 PM »
Renamed the /var/log file to a different name

created a new directory /var/log
rebooted
server started but httpd did not (neither did server-manager)

examined boot.log2030415011208

found these files missing

/var/log/error_log.20030415011201
/var/log/admin_error_log.20030415011206

created them, rebooted httpd works fine now, can read my logfiles through server-manager again.

found directory /var/log/squid is missing, recreated that directory

hope everything is fine again

Charlie Brady

Re: /var/log not a directory anymore
« Reply #3 on: April 20, 2003, 11:58:06 PM »
Meert wrote:

> hope everything is fine again

I'd be asking why /var/log disappeared, and what else is broken. Either you didn't apply necessary updates, and your system has been cracked, or you have serious file system corruption. Both require more remedial action than just creating new directories.

Charlie

Meert

Re: /var/log not a directory anymore
« Reply #4 on: April 21, 2003, 12:19:45 AM »
I don't know what happened. I applied all neccesary updates. I get the idea that this happened after installing the last update.
I haven't got a clue where I can check what caused this.

Meert

Re: /var/log not a directory anymore
« Reply #5 on: April 23, 2003, 06:09:18 PM »
Currently I'm trying to rebuild my server, but I found that there are hundreds of files called mgetty.log.ttyS*.*.*

searching Google I found this:

Currently the logrotate.d file for mgetty looks like this:
/var/log/mgetty.log.tty* {
        nocompress
           missingok
      }

This contains a subtle error. Let us say we start with the logfile:
mgetty.log.ttySO

the next round will give us:
mgetty.log.ttySO and mgetty.log.ttySO.1

So far so good. But the next time we will get:
mgetty.log.ttySO mgetty.log.ttySO.1 mgetty.log.ttySO.1.1

In the end you get hundreds of files with name like:
mgetty.log.ttySO.1.1.2.1.3

The first line in the mgetty file should be:
/var/log/mgetty.log.ttySO or /var/log/mgetty.log.ttyS?
or have two clauses. One mgetty.log.ttySO and one mgetty.log.ttyS2 if
necessary.
----------