Moodle found invalid permissions when creating a directory
P粉099985373
P粉099985373 2023-12-24 18:06:41
0
1
666

I encountered an error when trying to run a project developed in Moodle. "Invalid permissions detected" is displayed when trying to create a directory. "Turn on debugging for more details." error. I've run this command "chmod 0777 /var/www/html/e-learning" to enable write permissions but still doesn't work. Can anyone advise? Thanks.

P粉099985373
P粉099985373

reply all(1)
P粉476883986

This may be the data directory rather than the web directory

https://docs.moodle.org/401/en /Installing_Moodle#Create_the_.28moodledata.29_data_directory

Look for this value in config.php

$CFG->dataroot = '/var/yourmoodledatadirectory';

Then change permissions

sudo chmod -R 0777 /var/yourmoodledatadirectory

Also add it to config.php

$CFG->directorypermissions = 02777;

You may also need to change the ownership of the data directory

sudo chown -R www-data /var/yourmoodledatadirectory

Also, using 777 for web directories is deprecated, please use 755

instead
sudo chmod -R 0755 /var/www/html/moodle
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!