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

nginx cannot save file to mounted wordpress directory #18045

Closed
projectxmaker opened this issue Nov 17, 2015 · 2 comments
Closed

nginx cannot save file to mounted wordpress directory #18045

projectxmaker opened this issue Nov 17, 2015 · 2 comments

Comments

@projectxmaker
Copy link

Hi everyone,

I spent a few days on following issue but cannot figure out the solution, plz give me some guides to settle it :(

Environment

docker version: Docker version 1.9.0, build 76d6bc9

docker info: 
Containers: 2
Images: 27
Server Version: 1.9.0
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 31
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.1.12-boot2docker
Operating System: Boot2Docker 1.9.0 (TCL 6.4); master : 16e4a2a - Tue Nov  3 19:49:22 UTC 2015
CPUs: 1
Total Memory: 1.956 GiB
Name: default
ID: WYKL:KPEW:G5HY:YOQ4:4555:YU33:UJBP:4YOB:RWFK:HQNL:OLLG:BVJD
Debug mode (server): true
 File Descriptors: 20
 Goroutines: 38
 System Time: 2015-11-18T04:05:07.548898935Z
 EventsListeners: 0
 Init SHA1: 
 Init Path: /usr/local/bin/docker
 Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
 provider=virtualbox

uname -a:
Darwin My-MacBook 15.0.0 Darwin Kernel Version 15.0.0: Sat Sep 19 15:53:46 PDT 2015; root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64

Issue

1 "db" container for mysql
1 "web" container for nginx + php + /var/www/html/webapp is mounted to wordpress directory on host (/Users/www/wordpress)

Wordpress is installed normally, everything works fine (creating file from console of "web" container and save it to /var/www/html/webapp, check and find that that file exists on host too) but media upload feature of wordpress doesn't work, media files cannot be saved to /wp-content/uploads folder.

so I guessed that something wrong with permission on /var/www/html/webapp/wp-content/uploads, it could relate to www-data, then...

I checked /var/www/html/webapp on "web" container, found that owner of webapp directory is 1000 and group-owner is staff.

I tried to add www-data to staff group, but it doesn't work.

I tried to do "RUN chown -R www-data:www-data /var/www/html/webapp" in Dockerfile of "web" container but it also gives no effect because no change on owner of target folder is applied, it still is 1000:staff.

Expected

Media Upload feature of Wordpress works properly - Can save file to /var/www/html/webapp/wp-content/uploads folder

any help is much appreciated :(

regards,

@GordonTheTurtle
Copy link

Hi!

Please read this important information about creating issues.

If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.

If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.

This is an automated, informational response.

Thank you.

For more information about reporting issues, see https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues


BUG REPORT INFORMATION

Use the commands below to provide key information from your environment:

docker version:
docker info:
uname -a:

Provide additional environment details (AWS, VirtualBox, physical, etc.):

List the steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Provide additional info you think is important:

----------END REPORT ---------

#ENEEDMOREINFO

@thaJeztah
Copy link
Member

This is a duplicate of boot2docker/boot2docker#581 and a limitation of the way directories on the host (OS X) are shared with the boot2docker Virtual Machine using VirtualBox Sharing. Unfortunately there's no full solution for this currently, but the discussion on boot2docker/boot2docker#581 contains a lot of workarounds / alternative approaches that may be helpful.

I'm going to close this issue here, and suggest to subscribe to boot2docker/boot2docker#581 to follow progress.

Thanks for reporting, and I hope the linked issue helps you find a suitable workaround for your use case

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

3 participants