Sendmail - need help - boot - filesystem readonly

Alexander Peters info at hyperbird.de
Mon Jul 10 07:57:50 UTC 2006


James Gray schrieb:
> Alexander Peters wrote:
> >> Hello! I have a problem with my configuration of sendmail. When i boot
> >> my system there comes messages where i dont know what it means and
> how i
> >> can stop it. Can someone tell me what it here going on?
> >>
> >> Thanks in advance
> >>
> >> Alexander Peters
> >>
> >> Sat Jul  8 16:26:44 2006:  * Starting basic networking...       ^[[80G
> >> addr=127.0.0.1,
> >> Sat Jul  8 16:26:44 2006: /usr/share/sendmail/dynamic: line 160: cannot
> >> create temp file for here document: Read-only file system
> >> Sat Jul  8 16:26:44 2006: /usr/share/sendmail/dynamic: line 174: cannot
> >> create temp file for here document: Read-only file system
>
> -->8-- SNIPPED -->8--
>
> >> Sat Jul  8 16:26:44 2006: Mail Transport Agent: sendmail is not running
> >>
>
> You have a few like this (and above):
>
> "Sat Jul  8 16:26:44 2006: Could not open /etc/mail/databases(Read-only
> file system), using STDOUT."
>
> Strangely this means exactly what it says: the file system that
> /etc/mail/databases is on (usually root - "/") is mounted read only,
> *or* the directory hierarchy is read only.
>
> Check /etc/fstab to make sure root ("/") is mounted read+write AND that
> the permissions in /etc/mail are sane.  Sendmail is particularly anal
> about file system permissions for very good reasons.
>
> The root file system is usually mounted read-only during the initial
> boot sequence, before init is invoked switches to whatever run level is
> specified in /etc/inittab.  At some point soon after the root file
> system is remounted read+write.  Unless you changed this behaviour, it
> should be the default.  You can check this by simply running "mount" and
> looking for a line like this:
> /dev/hda2 on / type ext3 (rw)
>
> "Device" on "mount-point" type "format" ("options")
>
> Now, if sendmail is trying to start before the root file system is
> remounted read+write, OR you have specifically changed the root file
> system to mount read-only, then sendmail will barf.
>
> Similarly, the /etc/mail directory (on my RedHat sendmail servers) has
> the following permissions:
> user at host: /etc$ ls -ld mail
> drwxr-xr-x  3 root root 4096 Jun  1 16:42 mail
>
> Debian (Ubuntu et al) probably does things a little differently, but you
> can see at least the owner of the /etc/mail directory has full (rwx)
> permissions.
>
> HTH,
>
> James
>
> PS - mounting root ("/") read-only is a legitimate security precaution.
>  However, to do this you really need to make sure you know what you're
> doing and modify the init scripts and/or partition layout so as not to
> break necessary functionality.  For instance, /tmp is usually on the
> root file system, but nearly everything assumes this is world-writeable.
>  Making /tmp read-only will break lots of stuff, consequently, when
> building a hardened system with read-only root file system, you would
> need to move /tmp to it's own partition which is read+write.  Another
> example of "usually-on-root" but will break if read-only is /var [1].
>
> [1] I always put /var and /home on their own partitions and usually run
> quotas on /tmp etc.  Nothing worse than your system going to its knees
> because the root file system is full.

Hello James,
I found the error in /etc/network/if-up.d and ../if.-down.d. There are a
script "sendmail" and this scipts makes the errors, because he run when
the nic ist going ON, and this is to early. So i deleted this scripts
and all works. No Messages at Boottime and Sendmail is runing fine. I
found this problem in the ubuntu bugtracker (after hours).

Greetings
Alexander Peters





More information about the kubuntu-users mailing list