Hi i upgrade to Moodle 3.9 from 2.7 so i need to clean install the 3.9 moodle then FTP to custom code through FTP / git pull
after i successfully deply the code and database, i can login the Moodle 3.9 but cannot upload any file through the upload controller.
Below is the error after i type "file" under Site Administration search
**********
Warning: mkdir(): Permission denied in /var/www/html/wwwroot/lib/filestorage/file_system_filedir.php on line 441
Can not create local file pool directories, please verify permissions in dataroot.
Error code: storedfilecannotcreatefiledirs
- line 443 of /lib/filestorage/file_system_filedir.php: file_exception thrown
- line 1805 of /lib/filestorage/file_storage.php: call to file_system_filedir->add_file_from_string()
- line 986 of /lib/filestorage/file_storage.php: call to file_storage->add_string_to_pool()
- line 1167 of /lib/filestorage/file_storage.php: call to file_storage->create_directory()
- line 420 of /lib/filelib.php: call to file_storage->create_file_from_storedfile()
- line 10512 of /lib/adminlib.php: call to file_prepare_draft_area()
- line 8797 of /lib/adminlib.php: call to admin_setting_configstoredfile->output_html()
- line 76 of /admin/search.php: call to admin_search_settings_html()
**************
Below is the error when i click Site Administrator > Theme
************
Can not create local file pool directories, please verify permissions in dataroot.
Error code: storedfilecannotcreatefiledirs
- line 443 of /lib/filestorage/file_system_filedir.php: file_exception thrown
- line 1805 of /lib/filestorage/file_storage.php: call to file_system_filedir->add_file_from_string()
- line 986 of /lib/filestorage/file_storage.php: call to file_storage->add_string_to_pool()
- line 1167 of /lib/filestorage/file_storage.php: call to file_storage->create_directory()
- line 420 of /lib/filelib.php: call to file_storage->create_file_from_storedfile()
- line 10512 of /lib/adminlib.php: call to file_prepare_draft_area()
- line 114 of /admin/category.php: call to admin_setting_configstoredfile->output_html()
*********************
The environment is CentOS 7 and Apache 2.4 and PHP 7.2 and MariaDB 10
I have tried to amend all permission through
chmod 0775 -R /moodledata (and /<filepath>/moodleroot)
chown -R apache:apache /moodledata (and /<filepath>/moodleroot)
I have tried chmod 0777 or chown root:root / root:apache as well.
But the problem still exist. Does anyone have a solution to fix? Thank you very much.