Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chown: changing ownership of '/bitnami/moodle': Permission denied #75550

Open
redtonee opened this issue Dec 6, 2024 · 1 comment
Open

chown: changing ownership of '/bitnami/moodle': Permission denied #75550

redtonee opened this issue Dec 6, 2024 · 1 comment
Assignees
Labels
moodle tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@redtonee
Copy link

redtonee commented Dec 6, 2024

Name and Version

bitnami/moodle:latest

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. install colima and start it with colima start --vm-type=vz --vz-rosetta
  2. then use this docker command to start the maria db databse container
sudo docker run -d --name mariadb \
  --env ALLOW_EMPTY_PASSWORD=yes \
  --env MARIADB_USER=bn_moodle \
  --env MARIADB_PASSWORD=bitnami \
  --env MARIADB_DATABASE=bitnami_moodle \
  --network moodle-network \
  --volume /Users/fabian/moodle/mariadb:/bitnami/mariadb \
  bitnami/mariadb:latest
  1. then also start the moodle container with
sudo docker run -d --name moodle \
-p 8080:8080 -p 8443:8443 \
--env ALLOW_EMPTY_PASSWORD=yes \
--env MOODLE_DATABASE_USER=bn_moodle \
--env MOODLE_DATABASE_PASSWORD=bitnami \
--env MOODLE_DATABASE_NAME=bitnami_moodle \
--env BITNAMI_DEBUG=true \
--network moodle-network \
--volume /Users/fabian/moodle/moodle:/bitnami/moodle \
--volume /Users/fabian/moodle/moodledata:/bitnami/moodledata \
bitnami/moodle:latest

What is the expected behavior?

start normally and run the install script

What do you see instead?

I get the following error

moodle 10:04:16.06 INFO  ==> Ensuring Moodle directories exist
chown: changing ownership of '/bitnami/moodle': Permission denied

Additional information

moodle 10:04:04.26 INFO  ==> 
moodle 10:04:04.27 INFO  ==> Welcome to the Bitnami moodle container
moodle 10:04:04.27 INFO  ==> Subscribe to project updates by watching https://github.com/bitnami/containers
moodle 10:04:04.28 INFO  ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
moodle 10:04:04.29 INFO  ==> Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit https://bitnami.com/enterprise
moodle 10:04:04.30 INFO  ==> 
moodle 10:04:04.30 INFO  ==> ** Starting Moodle setup **
moodle 10:04:04.38 DEBUG ==> Validating settings in APACHE_* environment variables
moodle 10:04:04.44 DEBUG ==> Copying files from /opt/bitnami/apache/conf.default to /opt/bitnami/apache/conf
moodle 10:04:04.47 INFO  ==> Generating sample certificates
Certificate request self-signature ok
subject=CN = example.com
realpath: /bitnami/apache/conf: No such file or directory
moodle 10:04:15.19 INFO  ==> Configuring Apache ServerTokens directive
moodle 10:04:15.19 DEBUG ==> Configuring ServerTokens Prod on file /opt/bitnami/apache/conf/httpd.conf
moodle 10:04:15.34 INFO  ==> Configuring PHP options
moodle 10:04:15.37 INFO  ==> Setting PHP expose_php option
moodle 10:04:15.42 INFO  ==> Setting PHP output_buffering option
moodle 10:04:15.53 INFO  ==> Validating settings in MYSQL_CLIENT_* env vars
moodle 10:04:15.57 INFO  ==> Validating settings in POSTGRESQL_CLIENT_* env vars
moodle 10:04:15.77 DEBUG ==> Validating settings in MOODLE_* environment variables...
moodle 10:04:15.77 WARN  ==> You set the environment variable ALLOW_EMPTY_PASSWORD=yes. For safety reasons, do not use this flag in a production environment.
moodle 10:04:16.06 INFO  ==> Ensuring Moodle directories exist
chown: changing ownership of '/bitnami/moodle': Permission denied
@redtonee redtonee added the tech-issues The user has a technical issue about an application label Dec 6, 2024
@github-actions github-actions bot added the triage Triage is needed label Dec 6, 2024
@carrodher
Copy link
Member

Bitnami containers are designed to operate as non-root by default. Consequently, any files or directories used by the application should be owned by the root group, as the random user (1001 by default) is a member of this root group. To ensure proper permissions, you'll need to adjust the ownership of your local directory accordingly.

For more comprehensive information about non-root containers and their significance for security, you can explore the following resources:

These references provide valuable insights into the best practices and considerations when working with non-root containers in Bitnami applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
moodle tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

2 participants