Comments (6)
Can you provide a repo with the script and docker compose file you're using so I can reproduce it? Thanks!
from docker-php-fpm.
From the info you provided I guess the permission of the directory you mounted is wrong. You can try:
$ docker exec php_container_name id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data)
Then change the owner of your mounted volume:
chown 33:33 -R /var/www/html
from docker-php-fpm.
Can you provide a repo with the script and docker compose file you're using so I can reproduce it? Thanks!
Thanks for your fast reply!
Sure, here is the script.
And here is my docker-compose file.
from docker-php-fpm.
From the info you provided I guess the permission of the directory you mounted is wrong. You can try:
$ docker exec php_container_name id www-data uid=33(www-data) gid=33(www-data) groups=33(www-data)
Then change the owner of your mounted volume:
chown 33:33 -R /var/www/html
I'll wait for you to see if you can reproduce and solve the problem first 😉
from docker-php-fpm.
I'll wait for you to see if you can reproduce and solve the problem first 😉
Hi, I was unable to reproduce it. It works for me and creates the correct file when access the filetest.php
served from Nginx:
Can you try the solution mentioned in previous comment?
My environment: macOS 12.6 (21G115) with Docker Desktop 4.12.0
from docker-php-fpm.
Hi, I was unable to reproduce it. It works for me and creates the correct file when access the
filetest.php
served from Nginx:
Hmm, that's odd. Thanks for testing.
What do these commands do?
And where do I need to execute the second command? On my host, or from within the container?
Edit:
I have changed /var/www/html to /app, as in your original files.
From within the container, I see the files in /app.
This is what I see for file.txt
-rw-rw-r-- 1 1000 1000 3 Nov 24 13:16 file.txt
And now something hit me. What if I delete the file, and let PHP create it....
Now it works.
from docker-php-fpm.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-php-fpm.