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 folder permission issues #12

Closed
vlkz opened this Issue Jan 23, 2016 · 13 comments

Comments

Projects
None yet
6 participants
@vlkz

vlkz commented Jan 23, 2016

wp-content is root:root

The subfolders are www-data:www-data

When I go into wp-content/ and mkdir themes I get access denied.

Any suggested solutions?

@karellm

This comment has been minimized.

Show comment
Hide comment
@karellm

karellm Jan 25, 2016

Member

@vlkz Can you describe where you mkdir themes and what you are trying to achieve?

Member

karellm commented Jan 25, 2016

@vlkz Can you describe where you mkdir themes and what you are trying to achieve?

@vlkz

This comment has been minimized.

Show comment
Hide comment
@vlkz

vlkz Jan 25, 2016

@karellm I'm trying to begin developing a wordpress theme.

I clone this repo, cd into repo's folder, do docker-compose up, wait for it finish.

Visit localhost:8080, go through the wordpress setup.

From another terminal I cd to the repo's directory, a new folder has been created, wp-content, so I cd into it, no themes folder exists so I try to create it with mkdir themes and that's where I run into the permission issues.

vlkz commented Jan 25, 2016

@karellm I'm trying to begin developing a wordpress theme.

I clone this repo, cd into repo's folder, do docker-compose up, wait for it finish.

Visit localhost:8080, go through the wordpress setup.

From another terminal I cd to the repo's directory, a new folder has been created, wp-content, so I cd into it, no themes folder exists so I try to create it with mkdir themes and that's where I run into the permission issues.

@karellm

This comment has been minimized.

Show comment
Hide comment
@karellm

karellm Jan 26, 2016

Member

@vlkz I invite you to follow the tutorial. If you are not familiar with Docker, it might be a slightly weird process. If you have questions about any step of the tutorial, please let me know.

Member

karellm commented Jan 26, 2016

@vlkz I invite you to follow the tutorial. If you are not familiar with Docker, it might be a slightly weird process. If you have questions about any step of the tutorial, please let me know.

@karellm

This comment has been minimized.

Show comment
Hide comment
@karellm

karellm Jan 29, 2016

Member

Closing this, please reopen if you are having an issue with the tutorial.

Member

karellm commented Jan 29, 2016

Closing this, please reopen if you are having an issue with the tutorial.

@karellm karellm closed this Jan 29, 2016

@louisremi

This comment has been minimized.

Show comment
Hide comment
@louisremi

louisremi Jan 23, 2017

Contributor

Since I began using wordpress-starter two weeks ago, I had the same problem as @vlkz: every time I restart the container, I need to change the permission of volumed files in wp-content before I can edit and save them.

I thought this was normal but it probably isn't. Why aren't the file permissions 664 instead of 644 in run.sh? This way I can simply add myself to the www-data group, and start editing volumed with no permission changes.

Or have I missed something obvious in the tutorial?

Contributor

louisremi commented Jan 23, 2017

Since I began using wordpress-starter two weeks ago, I had the same problem as @vlkz: every time I restart the container, I need to change the permission of volumed files in wp-content before I can edit and save them.

I thought this was normal but it probably isn't. Why aren't the file permissions 664 instead of 644 in run.sh? This way I can simply add myself to the www-data group, and start editing volumed with no permission changes.

Or have I missed something obvious in the tutorial?

@dsifford

This comment has been minimized.

Show comment
Hide comment
@dsifford

dsifford Jan 23, 2017

Collaborator

@louisremi Known annoyance. Has to do with the bootstrap user being root. I can fix when I get some time.

Collaborator

dsifford commented Jan 23, 2017

@louisremi Known annoyance. Has to do with the bootstrap user being root. I can fix when I get some time.

@dsifford

This comment has been minimized.

Show comment
Hide comment
@dsifford

dsifford Jan 23, 2017

Collaborator

The fix in the meantime is to just run sudo chown -R $USER . in the project root on your local machine after building the first time.

Collaborator

dsifford commented Jan 23, 2017

The fix in the meantime is to just run sudo chown -R $USER . in the project root on your local machine after building the first time.

@louisremi

This comment has been minimized.

Show comment
Hide comment
@louisremi

louisremi Jan 23, 2017

Contributor

Alright. Can you reopen this bug to make sure its taken care of at some point :-)

Contributor

louisremi commented Jan 23, 2017

Alright. Can you reopen this bug to make sure its taken care of at some point :-)

@dsifford dsifford reopened this Jan 23, 2017

@louisremi

This comment has been minimized.

Show comment
Hide comment
@louisremi

louisremi Jan 24, 2017

Contributor

Note that I need to use your workaround after each docker-compose up, not just after building the first time. A 664 permission on Wordpress files would allow me to use my workaround just once :-)

Contributor

louisremi commented Jan 24, 2017

Note that I need to use your workaround after each docker-compose up, not just after building the first time. A 664 permission on Wordpress files would allow me to use my workaround just once :-)

@andrewhavens

This comment has been minimized.

Show comment
Hide comment
@andrewhavens

andrewhavens Apr 20, 2017

Contributor

FWIW I started using this project within the last two weeks, following the instructions in the tutorial and readme, and have not run into any kind of permissions issues. I'm running this on my Mac. Maybe this bug has been fixed?

Contributor

andrewhavens commented Apr 20, 2017

FWIW I started using this project within the last two weeks, following the instructions in the tutorial and readme, and have not run into any kind of permissions issues. I'm running this on my Mac. Maybe this bug has been fixed?

@carpnick

This comment has been minimized.

Show comment
Hide comment
@carpnick

carpnick May 1, 2017

Contributor

I just hit this with the themes folder and the plugin folder. It was being mounted as docker:staff. The files could not be read by apache(WP). Using boot2docker.

Narrowed it down to this issue: boot2docker/boot2docker#581

Which brought be to the following workaround(once container is built, inside container run):

usermod -u 1000 www-data
chown -R www-data:www-data .

This is making it so the mounted volumes and the user running apache are the same UID. Was going to put in a PR for this when I got a second. Just spent about 4-5 hours trying to get this to work on my end.

Contributor

carpnick commented May 1, 2017

I just hit this with the themes folder and the plugin folder. It was being mounted as docker:staff. The files could not be read by apache(WP). Using boot2docker.

Narrowed it down to this issue: boot2docker/boot2docker#581

Which brought be to the following workaround(once container is built, inside container run):

usermod -u 1000 www-data
chown -R www-data:www-data .

This is making it so the mounted volumes and the user running apache are the same UID. Was going to put in a PR for this when I got a second. Just spent about 4-5 hours trying to get this to work on my end.

@dsifford

This comment has been minimized.

Show comment
Hide comment
@dsifford

dsifford May 1, 2017

Collaborator

@carpnick #97 addresses and fixes this problem. Just waiting on code review 🎉

Collaborator

dsifford commented May 1, 2017

@carpnick #97 addresses and fixes this problem. Just waiting on code review 🎉

@carpnick

This comment has been minimized.

Show comment
Hide comment
@carpnick

carpnick May 1, 2017

Contributor

Thanks @dsifford . Needed to understand what the heck was going on before I attempted a review. Spent several hours understanding how your entire process was working, where docker/vbox/boot2docker all play together. I am rather new to docker, so I had to do a big lift to get the understanding.

Contributor

carpnick commented May 1, 2017

Thanks @dsifford . Needed to understand what the heck was going on before I attempted a review. Spent several hours understanding how your entire process was working, where docker/vbox/boot2docker all play together. I am rather new to docker, so I had to do a big lift to get the understanding.

@dsifford dsifford closed this in #97 May 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment