Wednesday, February 04, 2009

Mailx Error:can not write to queue directory /var/spool/clientmqueue/

Problem:

Try to use linux mail to send email and got error:

/bin/mailx -s "$SUBJECT" "$RECIPIENT"

can not write to queue directory /var/spool/clientmqueue/ (RunAsGid=51, required=101): Permission denied
can not write to queue directory /var/spool/clientmqueue/ (RunAsGid=51, required=101): Permission denied

Fix:

Check the owner and permission of /var/spool/clientmqueue.

Go to directory /var/spool, and used ls –ln command to see who is the owner and what is the permission are:

Shell>ls –ln

drwxrwx--- 2 51 51 4096 Jan 19 12:45 clientmqueue

The directory need to be owned by smmsp:smmsp.

If you only see the group id and user id display, check the /etc/passwd file to see is the group id belong to smmsp.

Shell>vi /etc/passwd

smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin

If the group and user is not smmsp:smmsp, change them.

Shell> chown –R smmsp:smmsp clientmqueue.


1 comment:

Anonymous said...

I am truly thankful to the owner of this web site who has shared this fantastic piece of writing
at at this place.