Fix "Read-only file system" errors

Close #392.
This commit is contained in:
Régis Behmo 2020-12-17 19:10:42 +01:00
parent e782219268
commit 661d238600
2 changed files with 9 additions and 4 deletions

View File

@ -4,6 +4,8 @@ Note: Breaking changes between versions are indicated by "💥".
## Unreleased
- [Bugfix] Fix "Read-only file system" errors when running `tutor dev runserver` commands on Mac OS.
## v11.0.3 (2020-12-15)
- [Bugfix] Fix upload of video transcripts to S3 (again)

View File

@ -2,15 +2,18 @@
export DJANGO_SETTINGS_MODULE=$SERVICE_VARIANT.envs.$SETTINGS
if id -u openedx > /dev/null 2>&1; then
# Change file permissions of mounted volumes
# Change owners of mounted volumes
echo "Setting file permissions for user openedx..."
find /openedx -not -path "/openedx/edx-platform/*" -not -user openedx -exec chown openedx:openedx {} \+
find /openedx \
-not -path "/openedx/edx-platform/*" \
-not -user openedx \
-perm /u=w \
-exec chown openedx:openedx {} \+
echo "File permissions set."
# Run CMD as user openedx
exec chroot --userspec="openedx:openedx" --skip-chdir / env HOME=/openedx "$@"
else
echo "Running openedx-dev as root user"
exec "$@"
fi