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

Missing socks dir in image #1444

Closed
owngr opened this issue Sep 20, 2023 · 2 comments · Fixed by #1473
Closed

Missing socks dir in image #1444

owngr opened this issue Sep 20, 2023 · 2 comments · Fixed by #1473

Comments

@owngr
Copy link

owngr commented Sep 20, 2023

Hello there,

Image impacted: 8.1-apache-bookworm

We run your docker images as non root and recently noticed that it isn't possible to run apache2ctl anymore. I get the following error when trying to run any apache2ctl command:

apache2ctl -k graceful
chown: changing ownership of '/var/run/apache2/socks.6lWmhC0DVq': Operation not permitted

apache2ctl has this line of code in it

[ ! -d ${APACHE_RUN_DIR:-/var/run/apache2}/socks ] && mkdir_chown ${APACHE_RUN_USER:-www-data} ${APACHE_RUN_DIR:-/var/run/apache2}/socks

The problem seems to be that the /var/run/socks folder doesn't exist in your image and then apache2ctl needs root access to create it.

The problem seems to be only in the bookworm version, the bullseye version works as expected.

I think creating the folder here would solve the problem

# setup directories and permissions

@tianon
Copy link
Member

tianon commented Dec 9, 2023

Ah, looks like this changed in/due to https://salsa.debian.org/apache-team/apache2/-/commit/b97ca8714890ead1ba6c095699dde752e8433205 -- yeah, I guess we probably need to pre-create it with appropriate permissions as well. 😞

I'll work on a PR.

@tianon
Copy link
Member

tianon commented Dec 9, 2023

I think #1473 should fix your issue 🤞

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

Successfully merging a pull request may close this issue.

2 participants