skip to Main Content

under CXS (ConfigServer eXploit Scanner) I can add directories to ignore during a virus scan on a cpanel server.

my problem is that when a user has more than 1 website in his cpanel account the dir look like this:

/home/username/domain1.com/public_html/dir1/dir2
/home/username/domain2.com/public_html/dir1/dir2

could you please tell me the correct regex code to include any directory name where /domain1.com/ could be any directory name.

I tried /home/username/*/public_html/dir1/dir2 but it’s not working.

thanks

2

Answers


  1. You can try this:

    /home/username/[^/]+/public_html/dir1/dir2
    

    Note that character set: [^/] allows the directory name to consist of anything except a forward-slash.
    So you may want to lock that down to a more specific character set, and be less permissive.

    Login or Signup to reply.
  2. You need to backslash all the forward slashes and exclude the possibility that a directory has a / or a NULL (0x00) char in its name:

    /home/username/[^/x00]+/public_html/dir1/dir2
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search