You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docker image works, but the User and Group comes from the directory which links into the docker image. The user and group is wrong there, its 5006 and 5005 instead of www-data like in the original directory.
What can I do to either have the same user and group or to tell Apache that it should not mind wrong user and group?
The text was updated successfully, but these errors were encountered:
This lies in the nature of Docker: The internal (container) users do not match with the external (host) users: So the Apache in my docker container is running under the www-data account, which has UID 33 within the container.
If you mount the /var/www dir from a host, it has the host's file UIDs assigned.
One solution would be to use Docker Volumes: The linked stackoverflow article describes this in detail:
Perhaps this helps.
If you just want to give the web server (www-data) write access to a specific dir, then the easiest way is to chown / chmod from within the container: docker exec -ti [containername] chown -R www-data:www-data /var/www/path/to/your/dir
The docker image works, but the User and Group comes from the directory which links into the docker image. The user and group is wrong there, its 5006 and 5005 instead of www-data like in the original directory.
What can I do to either have the same user and group or to tell Apache that it should not mind wrong user and group?
The text was updated successfully, but these errors were encountered: