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

Set apache run as current user #34

Closed
wants to merge 1 commit into from
Closed

Set apache run as current user #34

wants to merge 1 commit into from

Conversation

theandersonn
Copy link

I was having trouble running WordPress with recommended permissions for folders and files. I got it through the following setup.

@theandersonn
Copy link
Author

#28

@nezhar
Copy link
Owner

nezhar commented Sep 18, 2019

This is not bad and i think it could help solving the permission issue. The Wordpress container is based on the PHP docker container, which has documented this behavior (https://hub.docker.com/_/php/ - Running as an arbitrary user)

I will although add this to the readme, as this is something each developer should configure if required 🙂

@theandersonn
Copy link
Author

This alternative was inconsistent.
When starting the container, the user and group has problems with the user and group of the volume.

I am using user www-data and put it in my logged in user group.

Example: www-data: $ USER

I believe that this treatment would be ideal:
https://github.com/nezhar/laravel-docker-compose/blob/master/docker/php/entrypoint

How to apply this implementation to this project?

@nezhar
Copy link
Owner

nezhar commented Sep 18, 2019

I was thinking for a while to add this also in this repository, but this will change a bit the structure and the docs must be adapted.

I may combine this with the already existing branch for https: https://github.com/nezhar/wordpress-docker-compose/tree/https

@theandersonn
Copy link
Author

I understood. In my opinion, even if the folder organization changes slightly, the benefit of having the paired permissions will be greater.
Because for those unaware, you have to set 777 permission to run WordPress correctly.

@palomnik
Copy link

I've been running a script to change ownership back and forth between www-data and the local user (I sync the files in dropbox). This works but is extra hassle.

I discovered this solution which uses a host volume instead of the default wp-app local volume.

https://kaspars.net/blog/docker-volume-permissions

Thoughts?

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 this pull request may close these issues.

3 participants