Plesk

Various actions fail in Plesk with Fail2Ban installed after server reboot: Unable to open file /run/lock/files/, There is no directory /var/run/

Symptoms

Cause

The dynamic directory /run is re-created every server reboot but not all the required sub-folders are re-created.

Plesk bug with ID #PPPM-10011 which is planned to be fixed in one of the future product updates.

Resolution

As a workaround, configure the system to re-create the missing directories after each server reboot:

  1. Connect to the server via SSH;

  2. Create the missing directories:

    # mkdir /run/lock/files
    # mkdir /run/fail2ban

  3. Set correct permissions:

    # chown root:psaadm /run/lock/files/
    # chmod 770 /run/lock/files/

    # chown root:root /run/fail2ban
    # chmod 755 /run/fail2ban

  4. Create the files:

    Note: This step is for OS with Systemd support, for example, CentOS 7, Ubuntu 16 and etc.

    Note: This step requires root:root owner and group for "/" partition to work. Check with command "# ls -ld /"

    # echo "d /run/lock/files/ 0770 root psaadm" > /etc/tmpfiles.d/lockfiles.conf
    # echo "d /run/fail2ban 0755 root root" > /etc/tmpfiles.d/fail2ban.conf

Exit mobile version