> a user on my system just reported a problem using mail(1) to delete
> some at(1) logfiles. i use pine instead of mail(1), so i hadn't seen
> the problem before. below is a sample of the problem:
>
> man:mnelson> mail
> Mail version 8.1 6/6/93. Type ? for help.
> "/var/spool/mail/mnelson": 1 message 1 new
> >N 1 [EMAIL PROTECTED] Tue Jun 23 08:50 13/373 "test"
> & d
> & q
> Unable to lock mailbox: Permission denied
> man:mnelson>
>
> this happens on RedHat 5.1/Intel and 5.0/Alpha (both fully updated). pine
> doesn't have any problems deleting messages.
>
> after a few minutes of poking around, i couldn't find the cause of the
> problem, hence this message.
>
> any ideas?
>
> -matt
This sounds similar to a problem I was going to report. It involves
mailx-8.1.1 (both -1 and -2). I assume when you say you are fully updated
it means you have updated mailx.
Here is the problem as I see it. The new /bin/mail tries to create a
temporary file in /var/spool/mail but it doesn't have permission to write to
that directory. Here are permissions
-rwxr-xr-x 1 root root 72140 Jun 12 23:27 /bin/mail
drwxrwxr-x 2 root mail 1024 Jun 18 15:58 /var/spool/mail/
When I strace /bin/mail here is the interesting bit
setgid(100) = 0
open("/var/spool/mail/.iris0.c1a54", O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_SYNC, 0)
= -1 EACCES (Permission denied)
setgid(100) = 0
100 is my gid. This should fail since my group doesn't have write permision
to /var/spool/mail. Of course if I make /bin/mail setuid root it works but
that is a bad option. My understanding is that /bin/mail is frequently
installed setgid mail? but RedHat doesn't do this (on purpose).
I should note that the original mailx (5.5 something) that comes with RH5 works
fine with all the same permissions.
Craig
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.