Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sendmail - Directory Ownership and Permissions

Status
Not open for further replies.

faelord

Technical User
Jan 4, 2002
6
GB
Having recently reinstalled named (BIND), for some reason I am not entirely clear on, several of my mail directories were grabbed by it. I changed these back to what I think they should be, however sendmail no longer works. Root can send mail but no other user can. They generate an error saying

"can not chdir(/var/spool/clientmqueue/):permission denied
Program mode requires special privileges, e.g., root or TrustedUser."

Directory ownership/permissions for the /var/spool area are as shown below:

[tt]drwxr-xr-x 17 root named 4096 Nov 23 22:26 .
drwxr-xr-x 24 root root 4096 Dec 12 16:34 ..
drwxr-xr-x 2 root root 4096 Sep 14 20:08 anacron
drwx------ 3 root root 4096 Sep 14 19:50 at
drwxrwx--- 2 smmsp smmsp 4096 Dec 27 22:35 clientmqueue
drwx------ 2 root root 4096 Nov 25 00:32 cron
drwx--x--- 3 root sys 4096 Dec 14 17:39 cups
drwxr-xr-x 2 root root 4096 May 23 2005 lpd
drwxrwxr-x 2 root mail 4096 Dec 27 22:37 mail
drwx------ 2 root smmsp 4096 Dec 27 22:35 mqueue
drwxr-xr-x 2 rpm rpm 4096 Jul 13 16:44 repackage
drwxrwxrwt 2 root root 4096 May 2 2005 samba
drwxr-x--- 2 squid squid 4096 Oct 20 09:48 squid
drwxr-xr-x 3 root root 4096 Nov 8 18:28 squirrelmail
drwxr-xr-x 2 root root 4096 May 24 2005 up2date
drwxrwxrwt 2 root root 4096 May 27 2005 vbox[/tt]

/etc/passwd contains the following mail related users (as far as I can ascertain)

[tt]mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin
smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin[/tt]

 
I've just checked an untouched RHEL3 box and those permissions look correct.

What command are you using to send mail? Note that /usr/sbin/sendmail.sendmail has the sgid bit set, and group owner is "smmsp".

[tt]$ ls -l /usr/sbin/sendmail
lrwxr-xr-x 1 root root 21 Aug 5 2004 /usr/sbin/sendmail -> /etc/alternatives/mta
$ ls -l /etc/alternatives/mta
lrwxrwxrwx 1 root root 27 Nov 24 2004 /etc/alternatives/mta -> /usr/sbin/sendmail.sendmail
$ ls -l /usr/sbin/sendmail.sendmail
-rwxr-sr-x 1 root smmsp 650816 Jun 30 2004 /usr/sbin/sendmail.sendmail
$[/tt]

Annihilannic.
 
Hi,

Here is what I have for a new install rh 3.0

mqueue directory belongs to root mail

Code:
#pwd
/var/spool
#uname -a
Linux myserver 2.4.21-32.ELsmp #1 SMP Fri Apr 15 21:17:59 EDT 2005 i686 i68
# ls -al
total 64
drwxr-xr-x   16 root     root         4096 dic 19 13:57 .
drwxr-xr-x   25 root     root         4096 dic 19 14:01 ..
drwx------    3 daemon   daemon       4096 dic 19 13:49 at
drwxrwx---    2 smmsp    smmsp        4096 dic 28 09:30 clientmqueue
drwx------    2 root     root         4096 mar  4  2005 cron
drwx------    3 lp       sys          4096 dic 19 13:49 cups
drwxr-xr-x    2 root     root         4096 jan 25  2003 lpd
drwxrwxr-x    2 root     mail         4096 dic 28 08:24 mail
drwx------    2 root     mail         4096 dic 28 09:30 mqueue
drwxr-xr-x    2 rpm      rpm          4096 mar  2  2005 repackage
drwxr-xr-x    2 root     root         4096 jan 25  2003 rwho
drwxrwxrwt    2 root     root         4096 mar  4  2005 samba
drwxr-xr-x    2 root     root         4096 dic  1  2004 up2date
drwxr-xr-x    2 uucp     uucp         4096 jan 25  2003 uucp
drwxr-xr-x    2 uucp     uucp         4096 jan 25  2003 uucppublic
drwxrwxrwt    2 root     root         4096 ao{ 11  2003 vbox
#
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top