• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Plesk 12.5: Problem sending Email from fail2ban "permission denied"

Onkeltom01

Basic Pleskian
OS: CentOS 7 (latest patch level)
Plesk: 12.5.30 Update #12
Mailserver: postfix with dovecot

Hi all,
I have the problem that since Plesk was installed on this server, the before installed fail2ban installation can't send Emails over sendmail anymore. I didn't use the plesk integrated version of fail2ban!

So I get the following entry in the maillog while starting and stopping f2b when the system try to send a Email.
plesk sendmail[32166]: cannot create temporary file - (13) Permission denied
plesk sendmail[32166]: Unable to save stdin content to temporary file

before the installation of plesk on this server the fail2ban emailing works fine and without problems. Now, with plesk installed, fail2ban is unable to sendmail.

here is the part of f2b's sendmail.conf which generates the temporary file for mailing:
Code:
actionban = printf %%b "Subject: [Fail2Ban] <name>: banned <ip> from `uname -n`
  Date: `LC_ALL=C date +"%%a, %%d %%h %%Y %%T %%z"`
  From: <sendername> <<sender>>
  To: <dest>\n
  Hi,\n
  The IP <ip> has just been banned by Fail2Ban after
  <failures> attempts against <name>.\n
  Regards,\n
  Fail2Ban" | /usr/sbin/sendmail -f <sender> <dest>

Which and where must the permissions be set for generation of the temporary file ?
any idea what is wrong ?
all other tools like logwatch etc. works fine and sending Emails to the root account.
 
Last edited:
As possible solution try to repair the package permissions with

# rpm --setperms plesk-mail-pc-driver
 
Thanks for your reply Igor, I tried this but no change
Nov 24 07:54:14 journal: plesk sendmail[8251]: cannot create temporary file - (13) Permission denied
Nov 24 07:54:14 journal: plesk sendmail[8251]: Unable to save stdin content to temporary file
Nov 24 07:54:15 journal: plesk sendmail[8263]: cannot create temporary file - (13) Permission denied
Nov 24 07:54:15 journal: plesk sendmail[8263]: Unable to save stdin content to temporary file
Nov 24 07:54:16 journal: plesk sendmail[8273]: cannot create temporary file - (13) Permission denied
Nov 24 07:54:16 journal: plesk sendmail[8273]: Unable to save stdin content to temporary file
Nov 24 07:54:17 journal: plesk sendmail[8283]: cannot create temporary file - (13) Permission denied
Nov 24 07:54:17 journal: plesk sendmail[8283]: Unable to save stdin content to temporary file
Nov 24 07:54:19 journal: plesk sendmail[8340]: cannot create temporary file - (13) Permission denied
Nov 24 07:54:19 journal: plesk sendmail[8340]: Unable to save stdin content to temporary file
Nov 24 07:54:19 journal: plesk sendmail[8347]: cannot create temporary file - (13) Permission denied
Nov 24 07:54:19 journal: plesk sendmail[8347]: Unable to save stdin content to temporary file
Nov 24 07:54:19 journal: plesk sendmail[8354]: cannot create temporary file - (13) Permission denied
Nov 24 07:54:19 journal: plesk sendmail[8354]: Unable to save stdin content to temporary file
Nov 24 07:54:19 journal: plesk sendmail[8361]: cannot create temporary file - (13) Permission denied
Nov 24 07:54:19 journal: plesk sendmail[8361]: Unable to save stdin content to temporary file
 
i had the same problem here. the only solution that works for me was to change from sendmail to mail.
i found the config files for mail in /usr/share/doc/failban-0.9.2/dist-config/action.d.
 
thanks justme for your reply!
This would be the last option I will try. It's not only the change from sendmail to mail, all the datailed information files are standard only for sendmail, so I have to build all the files on my own to use mail instead of sendmail.
This behaviour was caused by the plesk 12.5 installation! So it would be very nice that the problem is also fixed from Odin/Parallels by a solution.
 
The plesk installation leaves the original sendmail in /usr/sbin/ as sendmail.postfix
after changing the fail2ban action.d sendmail* files to use /usr/sbin/sendmail.postfix as mailer it's working again.

This is a quick workaround but not a solution for a plesk installation!
Odin/Parallels have to put this on their ToDo list to fix it in future releases...
 
Odin/Parallels have to put this on their ToDo list to fix it in future releases...
From Odin point of view it is incorrect workflow to install Plesk over already existing hosting infrastructure (already installed fail2ban). According to Installation requirements Plesk should be installed on fresh OS installation without any third-party software. Therefore we are not responsible for incorrect operation of this third-party software. Use fail2ban from default Plesk installation for avoiding this initial problem.
 
thanks Igor,
removing fail2ban before installing Plesk 12.5 and reinstall it afterwards makes no change of the issue, i tried it in the meanwhile. I think the problem is still the "sendmail" update from plesk which not allows third-party software to use a temporary file (where ever they are) and this is a point of Odin/Parallels!
Using fail2ban from plesk is no option because of the old outdated version. actual Fail2ban version is 0.9.x an not 0.8.xxx, also the flexibility of spezial and other "more" filters are not given in Plesk's f2b!
The same for Horde Webmail....
 
Using fail2ban from plesk is no option because of the old outdated version. actual Fail2ban version is 0.9.x an not 0.8.xxx

0.9.2 version of fail2ban is used in Plesk 12.5:

[root@ppu12-5 ~]# plesk version
Product version: 12.5.30 Update #13
Update date: 2015/11/27 04:52
Build date: 2015/11/26 17:00
OS version: CentOS 6.7
Revision: 344620
Architecture: 32-bit
Wrapper version: 1.2

[root@ppu12-5 ~]# rpm -qa | grep fail2ban
fail2ban-0.9.2-centos6.15103017.noarch
 
Oops :eek:
I was still thinking about my other Plesk 12.0.18 Servers and a comment here in the forum that plesk 12 doesn't support f2b 0.9.x ... but also on this machines the plesk f2b version is not the latest fail2ban-0.9.3-1

[root@xxxxxx ~]# plesk version
Product version: 12.0.18 Update #70
Update date: 2015/10/31 17:05
Build date: 2015/10/14 14:00
Build target: CentOS 6
Revision: 333059
Architecture: 64-bit
Wrapper version: 1.1

[root@xxxxxx ~]# rpm -qa | grep fail2ban
fail2ban-0.9.3-1.el6.1.noarch

and on the new server with 12.5:

[root@xxxxxx ~]# plesk version
Product version: 12.5.30 Update #12
Update date: 2015/11/25 16:48
Build date: 2015/10/23 17:00
OS version: CentOS 7.1.1503
Revision: 344620
Architecture: 64-bit
Wrapper version: 1.2

[root@xxxxxx ~]# rpm -qa | grep fail2ban
fail2ban-0.9.3-1.el7.noarch
 
Hi Onkeltom01,

neither Fail2Ban version
fail2ban-0.9.3-1.el6.1.noarch
nor Fail2Ban version
fail2ban-0.9.3-1.el7.noarch
is a Plesk package. Please consider to install the Fail2Ban version from Plesk, instead of using third party components.

This behaviour was caused by the plesk 12.5 installation! So it would be very nice that the problem is also fixed from Odin/Parallels by a solution.
As you see, this is not a Plesk-related issue. Please don't blame Odin/Parallels for something that you are responsible for. If you insist on installing un-supported packages on your server(s), you might experience issues/problems/failures.


Explanation, why Fail2Ban version 0.9.3 is not yet supported by Plesk:

Fail2Ban version 0.9.3 is based on iptables 1.4.20 ( which is not present on older operating systems, which are currently supported by Plesk ). For compatibilty reasons, Odin decided to stay at version 0.9.2 at the moment.
 
Back
Top