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

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux

Created:

2016-11-16 13:11:50 UTC

Modified:

2016-12-21 20:10:08 UTC

0

Was this article helpful?


Have more questions?

Submit a request

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

Symptoms

Mail is sent out via PHP script, but the folowing error appears in /var/log/maillog :

Feb 24 00:55:47 example.com plesk sendmail[14591]: cannot create temporary file - (13) Permission denied
Feb 24 00:55:47 example.com plesk sendmail[14591]: Unable to save stdin content to temporary file

SELinux is set to enforcing mode:

 # getenforce
Enforcing

Cause

SELinux contexts are corrupted or changed.

Resolution

  1. Ensure that Plesk SELinux module is active

    # semodule -l| grep plesk
    plesk 12.5.30
  2. If the module is enabled and the version is correct, perform the following actions and restart mail server:

    # restorecon /usr/libexec/postfix/plesk_saslauthd
    # restorecon -R /usr/lib64/plesk-9.0/
    # restorecon -R /var/lib/plesk/mail
    # restorecon -R /usr/local/psa
    # restorecon /etc/resolv.conf
  3. If the module has another version or empty output, perform the following action and restart mail server:

    # /usr/local/psa/etc/selinux_policy_upgrade_trigger

Additional information

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

Unable to upgrade Plesk selinux module: Module plesk depends on permission audit_access in class dir, not satisfied (No such file or directory)

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