Simple Regex not working for /etc/csf/csf.pignore

Post Reply
amasci
Junior Member
Posts: 1
Joined: 30 Oct 2018, 09:14

Simple Regex not working for /etc/csf/csf.pignore

Post by amasci »

Hi, I am trying to exclude a few process in the /etc/csf/csf.pignore script with some simple regex rules, but I am still getting alerts. The rules I am trying are;

Code: Select all

pexe:/opt/cpanel/ea-php*/root/usr/sbin/php-fpm
pexe:/opt/cpanel/ea-php*/root/usr/bin/php-cgi
However, if I enter these each manually as follows, they do work.

Code: Select all

#exe:/opt/cpanel/ea-php54/root/usr/bin/php-cgi
#exe:/opt/cpanel/ea-php70/root/usr/bin/php-cgi
#exe:/opt/cpanel/ea-php71/root/usr/bin/php-cgi
#exe:/opt/cpanel/ea-php72/root/usr/bin/php-cgi
#
#exe:/opt/cpanel/ea-php71/root/usr/sbin/php-fpm
#exe:/opt/cpanel/ea-php72/root/usr/sbin/php-fpm
Can anyone point me as to what I am doing wrong?
Thanks,
logout
Junior Member
Posts: 14
Joined: 17 Jul 2017, 01:51

Re: Simple Regex not working for /etc/csf/csf.pignore

Post by logout »

I was also looking for an answer to this.

Other examples in the file have the asterisk always prefixed with a dot, so possibly:

Code: Select all

pexe:/opt/cpanel/ea-php.*/root/usr/bin/php-cgi
or use parentheses like:

Code: Select all

pexe:/opt/cpanel/ea-php(56|70|71|72)/root/usr/bin/php-cgi
That's my two cents.
Post Reply