Outgoing mail does not work: cannot create temporary file - (13) Permission denied

Created:

2016-11-16 12:48:35 UTC

Modified:

2017-08-16 17:17:54 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Outgoing mail does not work: cannot create temporary file - (13) Permission denied

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux

Symptoms

Sending a message from a server fails with error:

qmail-remote-handlers[20058]: Handlers Filter before-remote for qmail started ...

==> qmail-remote-handlers[20058]: cannot create temporary file - (13) Permission denied

qmail-remote-handlers[20058]: cannot read message from stdin

==>qmail: 1379569885.888285 delivery 129: failure: handlers_permanentfail/

Cause

Incorrect permissions to mail handler file:

    # ll /var/qmail/bin/qmail-remote
-r-xr-xr-x 1 root qmail 103195 Sep 17 02:43 /var/qmail/bin/qmail-remote

Correct permissions are:

    # ll /var/qmail/bin/qmail-remote
-r-x--s--x 1 mhandlers-user popuser 103195 Sep 17 02:43 /var/qmail/bin/qmail-remote

Resolution

  1. Discover what package the file belongs to and find files with modified permissions owned by the package:

    # rpm -qf /var/qmail/bin/qmail-remote
    plesk-mail-qc-driver

    # rpm -V plesk-mail-qc-driver
    SM5....T. /usr/lib64/plesk-9.0/mailsrv_conf_init
    S.5....T. /usr/local/psa/admin/sbin/mailmng
    S.5....T. /usr/local/psa/admin/sbin/mailmng-core
    ......G.. /var/lib/plesk/mail/auth
    SM5....T. /var/qmail/bin/qmail-local

    M in the output above means Mode differs (includes permissions and file type).

  2. Repair the package permissions:

    # rpm --setperms plesk-mail-qc-driver

All the modified permissions will be set to default ones:

    [root@ppp115 ~]# rpm -V plesk-mail-qc-driver
S.5....T. /usr/lib64/plesk-9.0/mailsrv_conf_init
S.5....T. /usr/local/psa/admin/sbin/mailmng
S.5....T. /usr/local/psa/admin/sbin/mailmng-core
......G.. /var/lib/plesk/mail/auth
S.5....T. /var/qmail/bin/qmail-local

Additional information

Mail test PHP script issue: cannot create temporary file - (13) Permission denied

Have more questions? Submit a request
Please sign in to leave a comment.