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

fix docker permission issues #17

Merged
merged 2 commits into from
Dec 3, 2021
Merged

Conversation

pestotoast
Copy link
Contributor

This should fix #10
The start.sh script of the mastercontainer now runs with root privileges so we can manage group permissions during startup.

I adjusted the supervisor.conf of the mastercontainer so that all other processes still run as www-data, but had some issues with log file permissions, thats why I removed some logging options from the supervisor.conf. (Do we need them?)

Signed-off-by: Adrian Gebhart <adrian@pestotoast.de>
@LukasReschke
Copy link
Member

@szaimen WDYT? :)

@LukasReschke LukasReschke added the 3. to review Waiting for reviews label Dec 1, 2021
@szaimen
Copy link
Collaborator

szaimen commented Dec 1, 2021

@pestotoast Thank you for your PR! I just discussed with @LukasReschke that your PR makes sense. I'll test it and update it if needed later on. Please make sure to allow edit by the maintainers for your branch, if not already done. Thanks! :)

@szaimen szaimen added this to the next milestone Dec 2, 2021
Signed-off-by: szaimen <szaimen@e.mail.de>
Copy link
Collaborator

@szaimen szaimen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. I'll test this now on the develop channel

@szaimen szaimen merged commit 994b128 into nextcloud:main Dec 3, 2021
@pestotoast
Copy link
Contributor Author

pestotoast commented Dec 3, 2021

Unfortunately those new changes don't work for me. I get a permission denied error now:

[Fri Dec 03 11:48:32.569176 2021] [core:crit] [pid 58] (13)Permission denied: [client 127.0.0.1:43128] AH00529: /var/www/docker-aio/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/docker-ai
o/' is executable

docker exec -it nextcloud-aio-mastercontainer chown -R root:www-data /var/www/docker-aio seems to fix it though

But after the login I get:

Fatal error: Uncaught GuzzleHttp\Exception\ConnectException: cURL error 7: (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost/v1.41/networks/create in /var/www/docker-aio/php/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210

My guess is that it's another permission error with docker now. Apache still seems to run as www-data, but /var/run/docker.sock now has root:root permissions.

@szaimen
Copy link
Collaborator

szaimen commented Dec 3, 2021

Yes, thanks for testing! I've just seen the problem, too. Will fix it in #33. Fortunately it isn't deployed to latest, yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker socket is not readable by the www-data user.
3 participants