-
-
Notifications
You must be signed in to change notification settings - Fork 579
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
Unable to create the PID file (/run/php/php8.1-fpm.pid).: Permission denied (13) (with custom Dockerfile/webimage_extra_packages) #6131
Comments
Can confirm. I am also facing the same error, after updating to latest DDEV and Docker Versions. I restarted system multiple times after upgrade. MacBook Pro M1 Chip. OS : macOS Monterey Version 12.5 ddev version v1.23.0 Docker version 26.0.0, build 2ae903e I have PHP8.2 so I am getting this error.
|
I guess you both probably have a .ddev/web-build/Dockerfile that does something? Could you please show that? It apparently needs to chmod the pid files after whatever it does. Note that |
Hi @rfay , I don't remember if my .ddev/web-build/Dockerfile do something specific because it worked until I update to the latest version of ddev... This is my .ddev/web-build/Dockerfile :
I can screen you my .ddev and you will see I didn't make another custom dockerfile for this project : |
Thanks @rfay for looking into this. This is my .ddev/web-build/Dockerfile . It used to work before todays update.
|
I assume that if you add this to your Dockerfile it will work. Also if you remove the Dockerfile it works right?
I'd be interested in seeing the output of |
@bhanu951 I imagine you need
DDEV v1.23.0 is built on Debian 12 Bookworm, and some things are a little different. I'd like to know if that fixes it for you, if removing the Dockerfile fixes it for you, and what your You shouldn't need to install python3.11 btw. |
@rfay It did not solve it. Getting below error.
Any specific reason ? |
python3 is there by default. Maybe you need to |
Related to: The fix is already available in DDEV HEAD, if you want to test it. Or simply modify the RUN chmod 777 /run/php |
Removing the Dockerfile and restarting the project worked. But adding below commands in the Dockerfile did not work.
or
Error
|
Sorry, the
And when I try with the line
And finally, this is what I got when I do it without the Dockerfile :
So we can say it works when deleting the Dockerfile! Thank you @rfay ! And sorry @stasadev but when you look my |
The RUN chmod 777 /run/php is in the wrong place for your situation (needs to be at the end). That's why @stasadev fixed it in HEAD. Please test in HEAD or do what he suggested. |
Yes, I know that, you simply need to add: RUN chmod 777 /run/php to the end of your |
|
@bhanu951, please re-read what is written above, revert your RUN echo | sudo mkdir -p /run/php && chmod 777 /run/php
RUN echo | sudo chmod 777 /run/php/php${PHP_VERSION}-fpm.pid and add this at the end of your RUN chmod 777 /run/php |
alright, I've tried what you asked and it worked too like you can see in this
But I don't understand why with the update of ddev, we now have to add |
Because we switched from Debian 11 Bullseye to Debian 12 Bookworm in DDEV v1.23.0, something changed upstream (quite a lot), and some You don't need to add It will not be needed in the next DDEV release. |
Pinning this and updating title, since obviously it will happen to others with custom Dockerfiles until v1.23.1 comes out. |
Thanks for solving this even before it was noticed @stasadev . Sorry I didn't understand the implications when offering support here. |
TL;DR:
If you have the "permission denied" on /run/php or related errors, and have a custom Dockerfile,
Add this to the end of your custom .ddev/web-build/Dockerfile:
Is there an existing issue for this?
Output of
ddev debug test
Expand `ddev debug test` diagnostic information
Expected Behavior
The expected behavior would be that the web container start....
Actual Behavior
Steps To Reproduce
In this environment :
I'm using the last version of ddev to build a Drupal 9 project (yeah I know, Drupal 9 is deprecated but not my choice) on me WSL
With this config :
I'm only running "ddev start" like you can see there :
The "ddev logs -s web" give me this :
Anything else?
No response
The text was updated successfully, but these errors were encountered: