- Identify the web server user: Find out the user that your web server is using. This can be different based on your system, such as www-data, www, apache, httpd, etc.
- Change user and group for directories: Modify the user and group ownership of the “moodledata” and “moodle” directories to “root:www-data” (replace “www-data” with your specific web server user). Example command:
-
sudo chown -R root:www-data /path/to/moodledata
- Adjust permissions for directories and files: Set the permissions for both directories to 775 for folders and 664 for files. This ensures the right balance of access for security and functionality.
sudo chmod -R 775 /path/to/moodledata
sudo chmod -R 775 /path/to/moodle
These commands are executed in the terminal and assume you have the necessary permissions (sudo). Make sure to replace “/path/to/” with the actual path to your Moodle directories.
Post Views: 1,569