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

wp/content has right ownership #12

Closed
gammaw opened this issue Jan 13, 2019 · 1 comment
Closed

wp/content has right ownership #12

gammaw opened this issue Jan 13, 2019 · 1 comment
Assignees

Comments

@gammaw
Copy link
Member

gammaw commented Jan 13, 2019

Description: currently wp-content is owned by root which prevents from uploading media because wp-content/uploads is not writible by www-data user inside the Wordpress container

Root cause: COPY command in Dockerfile and volumen setup (--volume) in docker run. Btw, why do we need both?

Fix hints:
https://stackoverflow.com/questions/28879364/docker-copy-and-change-owner
https://devops.stackexchange.com/questions/4540/how-to-change-the-owner-of-volume-directory-in-dockerfile
https://stackoverflow.com/questions/30052019/docker-creates-files-as-root-in-mounted-volume
https://stackoverflow.com/questions/44251019/wordpress-on-docker-could-not-create-directory-on-mounted-volume
moby/moby#3124

Workaround:
SSH into Wordpress container: docker exec -it lahma-wp /bin/bash
Change ownership: chown -R www-data:www-data wp-content/

@gammaw gammaw added the devops label Jan 13, 2019
@gammaw gammaw added this to the 0.2 milestone Jan 13, 2019
@gammaw gammaw modified the milestones: 0.2 - 24/7, backup, live meta, 0.3 Feb 27, 2019
@gammaw gammaw modified the milestones: 0.3 - stability release, 0.4 Apr 2, 2019
@gammaw gammaw modified the milestones: 0.4 frontend: news and schedule upgrade, 0.5 Apr 10, 2019
@gammaw
Copy link
Member Author

gammaw commented May 17, 2019

Can be fixed manually. Enough for now

@gammaw gammaw closed this as completed May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants