Permissions issues in the docker containers

With tutor 11.0.2, in MacOS, the system we use for development, when spinning up containers:

tutor dev runserver cms

We are getting consistently these errors on the docker container:

Setting file permissions for user openedx...
chown: changing ownership of '/openedx/config': Read-only file system
chown: changing ownership of '/openedx/config/cms.env.json': Read-only file system
chown: changing ownership of '/openedx/config/lms.env.json': Read-only file system
Error: Command failed with status 1: docker-compose -f /Users/neithan/.local/share/tutor/env/local/docker-compose.yml -f /Users/neithan /.local/share/tutor/env/dev/docker-compose.yml --project-name tutor_dev run --rm --service-ports lms

This can be overcome by editing the docker-compose files manually:

/Users/neithan/.local/share/tutor/env/local/docker-compose.yml
/Users/neithan/.local/share/tutor/env/dev/docker-compose.yml

And mounting the volumes with something distinct from :ro (read-only), for example, we put ā€œ:zā€ instead of ā€œ:roā€

After that, we can do

tutor images build openedx-dev
tutor dev runserver cms

to be able to spin up the containers fine:

The cms service will be available at http://studio.local.overhang.io:8001
docker-compose -f /Users/neithan/.local/share/tutor/env/local/docker-compose.yml -f /Users/neithan/.local/share/tutor/env/dev/docker-compose.yml --project-name tutor_dev run --rm --service-ports cms
Starting tutor_dev_lms_1 ... done
Creating tutor_dev_cms_run ... done
Setting file permissions for user openedx...
File permissions set.

Is that something that tutor can change, so we donĀ“t need to do this manually?

Hi @vejeta! Thanks for reporting this. It is definitely a bug, so you can create a new Github issue. Please add a full description as well as a link to this conversation.

Iā€™d very much like to keep the :ro label for future compatibility with Docker Swarm. This is a case where we need to improve the file permissions system in the dev container (again).

(Note to self: here is some info on what the ā€œ:zā€ flag does: https://stackoverflow.com/questions/35218194/what-is-z-flag-in-docker-containers-volumes-from-option)

Thanks @regis for the prompt reply and confirming.
This is now tracked in: https://github.com/overhangio/tutor/issues/392

This has been solved in tutor 11.0.4

Hi, I am running tutor version 11.0.6 and still experiencing this issue, when running either tutor dev runserver lms or tutor dev lms bash on Mac. Still getting the same messages:

@c3ho Did you remember to re-build the ā€œopenedx-devā€ Docker image prior to running dev commands?

tutor dev stop
tutor images build openedx-dev 
tutor dev runserver lms

Hi @regis,

Yes. I just retried recently after using the command ā€˜docker system prune -af ā€”volumesā€™ and removed all images. Then rebuilt both images. Same issue, please let me know if I can do anything else to give you more info

I tested also with latest tutor 11.0.7 and the error has reappeared for me too.

I did

  1. Installed latest tutor.

tutor config save
tutor dev stop
tutor images build openedx-dev 
tutor dev runserver cms

Also getting this bug when running dev on tutor 11.0.7 on macOS Mojaveā€¦

To investigate this further, please run the following commands:

  1. Run bash in the dev container with: tutor dev run --no-deps --entrypoint=bash lms
  2. Attempt to chown files with: find /openedx -not -path "/openedx/edx-platform/*" -not -user openedx -perm /u=w -exec chown openedx:openedx {} \+
  3. Attempt to chown files with: find /openedx -not -path "/openedx/edx-platform/*" -not -user openedx -writable -exec chown openedx:openedx {} \+

Did either of command 2 or 3 work for you?

1 Like

This (3.) command workedā€¦ At least there was no error message.

macOS 10.14.6 - Mojave

Printout:

tutor dev run --no-deps --entrypoint=bash lms

docker-compose -f /Users/andreas/.virtualenvs/koa/root/env/local/docker-compose.yml -f /Users/andreas/.virtualenvs/koa/root/env/dev/docker-compose.yml --project-name tutor_dev run --rm --no-deps --entrypoint=bash lms

Creating tutor_dev_lms_run ... done

root@d4a1cb6bebac:/openedx/edx-platform# find /openedx -not -path "/openedx/edx-platform/*" -not -user openedx -perm /u=w -exec chown openedx:openedx {} \+

chown: changing ownership of '/openedx/config': Read-only file system

chown: changing ownership of '/openedx/config/cms.auth.json': Read-only file system

chown: changing ownership of '/openedx/config/cms.env.json': Read-only file system

chown: changing ownership of '/openedx/config/lms.auth.json': Read-only file system

chown: changing ownership of '/openedx/config/lms.env.json': Read-only file system

root@d4a1cb6bebac:/openedx/edx-platform# find /openedx -not -path "/openedx/edx-platform/*" -not -user openedx -writable -exec chown openedx:openedx {} \+

root@d4a1cb6bebac:/openedx/edx-platform#

Thanks for the answer @ak00001. Can you check whether tutor v11.1.0 works for you?

1 Like

The v11.1.0 release solves the issue! Thanks for a quick solution Regis :smiley:

1 Like

after using v11.1.0 that can solved, thanks everyone!
jakarta barat
best regards