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

write access for application/public folder #227

Closed
svanschu opened this issue May 6, 2020 · 3 comments
Closed

write access for application/public folder #227

svanschu opened this issue May 6, 2020 · 3 comments

Comments

@svanschu
Copy link
Contributor

svanschu commented May 6, 2020

Hi,
I read the readme now multiple times and searched the issues.

I read the issue #154 and I looked at the https://hub.docker.com/_/nginx, which says that the nginx:alpine is running with: uid=101(nginx) gid=101(nginx) groups=101(nginx)

I'm trying to find the right userid/groupid that the webserver can habe write access to the application/public folder.

public folder with owner to be my host user --> server doesn't have write access
Setting files to 101:101 (sudo docker exec -it sitemap-dev-webserver chown -R nginx:nginx /application/public) --> server does'nt have write access

Which part am I missing?
This could be interesting for the readme or tutorial section #204

@luispabon
Copy link
Contributor

luispabon commented May 6, 2020

So you need to concentrate on the php-fpm container in fact, if you want to process file uploads. nginx does very little on this setup beyond serving as an HTTP way in into php-fpm.

The php container runs fpm at id 33 as you can see here:

 ~/P/phpdocker > docker-compose exec php-fpm ps aux  
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.0  0.0 452812 25820 ?        Ss   11:51   0:01 php-fpm: mast
www-data       6  0.0  0.1 459816 44224 ?        S    11:51   0:01 php-fpm: pool
www-data       7  0.0  0.1 458000 36384 ?        S    11:51   0:01 php-fpm: pool
root          21  0.0  0.0  34400  2764 pts/0    Rs+  17:03   0:00 ps aux
 ~/P/phpdocker >  docker-compose exec php-fpm id -u www-data 
33
 ~/P/phpdocker >  docker-compose exec php-fpm id -g www-data   
33

@svanschu
Copy link
Contributor Author

svanschu commented May 7, 2020

Oh man, I tried the right things on the wrong container. It works now as expected ...
Thank you.

I used till yet a classical LAMP stack ...

This hint would be usefull for README, FAQ or something like that.

@luispabon
Copy link
Contributor

luispabon commented May 7, 2020

No problemo 👍 happy to help

This hint would be usefull for README, FAQ or something like that.

Absolutely. If you could put it into words and have a few minutes, I would appreciate it if you could open a pull request to the README template used in the generator with how you made it work. It doesn't have to be perfect.

svanschu added a commit to svanschu/phpdocker.io that referenced this issue May 8, 2020
luispabon added a commit that referenced this issue May 12, 2020
File permission advice as talked about in  #227
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

No branches or pull requests

2 participants