I am trying to set permission on directories from a list.
Below is an example list where I would like dirA, dirB, dirC and dirD to get o-w permission.
"__cronjob_paths": [
"/dirA/dirB",
"/dirC/dirD",
]
file module has recursive option but it also sets the permissions on the files within the directories so it's not an option.
Would a regex or filter be the best way to solve this? Maybe filter out the /and save the directories into another list which i can loop through and set permissions?
I also need to have in mind that there could be other directories within the system that has a directory with the same name as the one from the list (which should not get o-w)