PHP: path format to exclude all subfolders

Relax and enjoy The Lounge. For all Non-Joomla! topics or ones that don't fit anywhere else. Normal forum rules apply.
Locked
User avatar
phidias81
Joomla! Explorer
Joomla! Explorer
Posts: 271
Joined: Thu Dec 15, 2011 11:44 pm
Contact:

PHP: path format to exclude all subfolders

Post by phidias81 » Fri Dec 19, 2014 11:31 am

Hello, I'm installing a security script, but I don't know anything about PHP. I installed correctly the script and put it to execute with a crone job. the problem is that I would like to exclude some folders from being scanned with the respective parameters but I can't manage.
These are the instructions
->excludeFolders( array folders )
This method can be used to exclude specific folders from being
checked. Each folder name must start with an existing entry in
CheckFolder. For example if CheckFolder is './public_html' then
to exclude the images folder you would specify
excludeFolders( array('./public_html/images') )
I want to exclude the folder "cache" and all of its subdirectories, and the folder "backup".
I've tried randomly for hours with

Code: Select all

array('./public_html/My-User/cache', './public_html/My-User/backup')
array('/public_html/My-User/cache', /public_html/My-User/backup')
array('public_html/My-User/cache', 'public_html/My-User/backup')
array('./public_html/My-User/cache/*', './public_html/My-User/backup')
array('/public_html/My-User/cache/*', /public_html/My-User/backup')
array('public_html/My-User/cache/*', 'public_html/My-User/backup')
array(My-User/cache/', My-User/backup')
But none is working.
What's the correct string I should insert to exclude these ddirectories? Thank you
At Nomad Travellers you find my travel stories, unusual places and amazing photos: visit my new website and travel from your chair! Make yourself comfortable and start your Nomad Travel! http://www.nomadtravellers.com/

User avatar
mandville
Joomla! Master
Joomla! Master
Posts: 15152
Joined: Mon Mar 20, 2006 1:56 am
Location: The Girly Side of Joomla in Sussex

Re: PHP: path format to exclude all subfolders

Post by mandville » Fri Dec 19, 2014 5:29 pm

mega mega important question. what security script??
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be reported, added to the foe list and possibly just deleted
{VEL Team Leader}{TM Auditor }{ Showcase & Security forums Moderator}

User avatar
phidias81
Joomla! Explorer
Joomla! Explorer
Posts: 271
Joined: Thu Dec 15, 2011 11:44 pm
Contact:

Re: PHP: path format to exclude all subfolders

Post by phidias81 » Sat Dec 20, 2014 1:33 am

It's to control all the files hat were changed-added-deleted and receive an email notification
At Nomad Travellers you find my travel stories, unusual places and amazing photos: visit my new website and travel from your chair! Make yourself comfortable and start your Nomad Travel! http://www.nomadtravellers.com/

User avatar
mandville
Joomla! Master
Joomla! Master
Posts: 15152
Joined: Mon Mar 20, 2006 1:56 am
Location: The Girly Side of Joomla in Sussex

Re: PHP: path format to exclude all subfolders

Post by mandville » Sat Dec 20, 2014 10:22 am

could you be more specific on the script you are installing? is-it a cron job as seen from security checklist 7 ?
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be reported, added to the foe list and possibly just deleted
{VEL Team Leader}{TM Auditor }{ Showcase & Security forums Moderator}

User avatar
mandville
Joomla! Master
Joomla! Master
Posts: 15152
Joined: Mon Mar 20, 2006 1:56 am
Location: The Girly Side of Joomla in Sussex

Re: PHP: path format to exclude all subfolders

Post by mandville » Mon Dec 22, 2014 9:14 pm

i have no experience on the script you provided
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be reported, added to the foe list and possibly just deleted
{VEL Team Leader}{TM Auditor }{ Showcase & Security forums Moderator}


Locked

Return to “The Lounge”