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

Permission issue of mounted volume: Cannot write into directory #620

Closed
onny opened this issue Jan 25, 2019 · 4 comments
Closed

Permission issue of mounted volume: Cannot write into directory #620

onny opened this issue Jan 25, 2019 · 4 comments
Labels

Comments

@onny
Copy link

onny commented Jan 25, 2019

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

@J0WI J0WI added the question label Jan 28, 2019
@J0WI
Copy link
Contributor

J0WI commented Jan 28, 2019

You could run the container with --user <user>, but in most cases chown to www-data is correct.

@onny
Copy link
Author

onny commented Mar 8, 2019

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

@onny
Copy link
Author

onny commented Mar 8, 2019

This might fix the issue, haven't tested it yet though.

@onny
Copy link
Author

onny commented Mar 12, 2019

This pull request fixes the issue for me: #686

@J0WI J0WI closed this as completed Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants