Moodle CLI installer and moodledata permission inconsistencies
0 reputation · 18 Aug 2023, 11:34 UTC
Automating Development Environments
Moodle supports a command-line interface (CLI) installation via /admin/cli/install.php to facilitate the creation of repeatable development environments without requiring a web browser. This process relies on a predefined config.php and a designated moodledata directory.
Permission Management Uncertainty
When automating these deployments across diverse operating systems or containerized environments, there is ambiguity regarding how the CLI installer handles the ownership and permissioning of the moodledata directory. Because the CLI script may be executed by a different system user than the one running the web server (e.g., Apache or Nginx), the resulting directory permissions can lead to runtime access failures.
- Does the CLI installation script attempt to modify
moodledatapermissions to match the executing user? - What is the recommended strategy for ensuring the web server retains write access to
moodledataafter a CLI-based setup?