I've setup 2 Moodle servers behind a HAproxy server. The dataroot directory is the same NFS mount on the 2 servers, which come from another server.
As specified in config.php, I create a directory local to each server for $CFG->tempdir
However, subdirectoried created under this directory are created with "root" as owner and group. Because of that, I get the famous "Invalid permissions detected in $CFG->dataroot directory, administrator has to fix permissions. " error message.
After changing owner to apache.apache, everything works well.
In developpement, I'm getting the following error:
===============
Error code: invaliddatarootpermissions
- line 1379 of /lib/setuplib.php: invalid_dataroot_permissions thrown
- line 1448 of /lib/setuplib.php: call to make_writable_directory()
- line 86 of /lib/classes/text.php: call to make_temp_directory()
- line 604 of /lib/classes/text.php: call to core_text::typo3()
- line 37 of /enrol/flatfile/settings.php: call to core_text::get_encodings()
- line 75 of /lib/classes/plugininfo/enrol.php: call to include()
- line 109 of /admin/settings/plugins.php: call to core\plugininfo\enrol->load_settings()
- line 6389 of /lib/adminlib.php: call to require()
- line 3518 of /lib/navigationlib.php: call to admin_get_root()
- line 3375 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings()
- line 717 of /lib/pagelib.php: call to settings_navigation->initialise()
- line 734 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
- line 109 of /blocks/admin_bookmarks/block_admin_bookmarks.php: call to moodle_page->__get()
- line 296 of /blocks/moodleblock.class.php: call to block_admin_bookmarks->get_content()
- line 238 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
- line 956 of /lib/blocklib.php: call to block_base->get_content_for_output()
- line 1008 of /lib/blocklib.php: call to block_manager->create_block_contents()
- line 361 of /lib/outputrenderers.php: call to block_manager->ensure_content_created()
- line 48 of /theme/essential/layout/columns2.php: call to core_renderer->standard_head_html()
- line 870 of /lib/outputrenderers.php: call to include()
- line 800 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
- line 2568 of /lib/outputrenderers.php: call to core_renderer->header()
- line 362 of /lib/setuplib.php: call to core_renderer->fatal_error()
- line ? of unknownfile: call to default_exception_handler()
Any idea on why this happen?
Thanks in advance for yoiur help!