open_basedir restriction

open_basedir restriction

by Cory B -
Number of replies: 1
Hello,

I'm having an issue with the open_basedir restriction. I would like to only allow php scripts to access files in "/var/www". Unfortunately some modules create temporary files in "/tmp" instead of the moodledata directory and won't work if I set the basedir restriction.

Is this is something that could be fixed in future versions of Moodle or if this is something I should just deal with? If it's something that can be changed I'm more than happy to help find places that access "/tmp" and help update them to point to the proper place in the moodledata directory.

Thanks!

-Cory
Average of ratings: -
In reply to Cory B

Re: open_basedir restriction

by Cory B -
I solved this one myself. You can setup two base directories:

Just do:  "open_basedir = /directory1:/tmp" in your php.ini file