Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

openbase_dir and subdirectories

i will have numerous subdirectories eg. /home/a, /home/a/file, /home/a/txt, /home/b, /home/b/file, /home/b/txt, etc.

the subdirectories are created on demand. i need to add all subdirectories to open_basedir.

pls advise how to make open_basedir recognise all subdirectories of a top path?

like image 811
peter chan Avatar asked Sep 10 '25 18:09

peter chan


1 Answers

From http://php.net/manual/en/ini.core.php#ini.open-basedir

The restriction specified with open_basedir is a directory name since PHP 5.2.16 and 5.3.4. Previous versions used it as a prefix. This means that "open_basedir = /dir/incl" also allowed access to "/dir/include" and "/dir/incls" if they exist. When you want to restrict access to only the specified directory, end with a slash. For example: open_basedir = /dir/incl/

/dir/incl/ = only the directory no subdirectories

dir/incl = all subdirectories

like image 109
VPDD Avatar answered Sep 13 '25 07:09

VPDD