Hey, I'm trying to mount my app into the docker container with this command:
docker run -v /home/onny/projects/web-nextcloud-app-radio:/var/www/html/custom_apps/radio -d -p 8080:80 nextcloud
Unfortunately I get following error on the Nextcloud start page:
Error
Cannot write into "apps" directory
This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file. See https://docs.nextcloud.com/server/15/go.php?to=admin-dir_permissions
It is fixed after manually chown the custom_apps folder to www-data:root. But is there any other way to fix this issue?
Best regards,
Jonas
You could run the container with --user <user>, but in most cases chown to www-data is correct.
Looks like the issue is not the permission of the app folder itself, it is the custom_apps folder created as root. I guess we need a fix in the Dockerfile!
root@3c12c52ca62d:/var/www/html/custom_apps# ls -la
total 0
drwxr-xr-x 1 root root 10 Mar 8 13:48 .
drwxrwxrwx 1 www-data root 428 Mar 8 13:48 ..
drwxr-xrwx 13 1000 1000 360 Mar 8 10:41 radio
This might fix the issue, haven't tested it yet though.
This pull request fixes the issue for me: https://github.com/nextcloud/docker/pull/686
Most helpful comment
Looks like the issue is not the permission of the app folder itself, it is the custom_apps folder created as root. I guess we need a fix in the Dockerfile!