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

Container fails to start when NFS-backed volume is mounted at /var/www/html #137

Closed
lmsurpre opened this issue Apr 1, 2016 · 3 comments
Closed

Comments

@lmsurpre
Copy link

lmsurpre commented Apr 1, 2016

I am trying to run this image on the IBM Containers service, but unfortunately when I map a volume to /var/www/html, it fails to start with the following errors:

WordPress not found in /var/www/html - copying now...
tar: ./wp-content/index.php: Cannot change ownership to uid 33, gid 33: Permission denied
tar: ./wp-content/plugins/akismet/readme.txt: Cannot change ownership to uid 33, gid 33: Permission denied
tar: ./wp-content/plugins/akismet/LICENSE.txt: Cannot change ownership to uid 33, gid 33: Permission denied
tar: ./wp-content/plugins/akismet/index.php: Cannot change ownership to uid 33, gid 33: Permission denied
tar: ./wp-content/plugins/akismet/wrapper.php: Cannot change ownership to uid 33, gid 33: Permission denied
...

After poking around, it looks like there is currently a limitation with the use of NFS-backed volumes which prevents the changing of file owners: https://console.ng.bluemix.net/docs/containers/container_troubleshoot.html#ts_vol_owner

As a workaround, I have wrapped this image with my own dockerfile that

  1. adds the www-data user to the root group; and
  2. grants group write access to /var/www/html

Happy to receive feedback on that approach, as well as any other ideas for working around this limitation.
Are there simple changes that could be made to the official image to make it work in this type of environment?

@shankie-codes
Copy link

@lmsurpre did you get anywhere further with this? I'm having exactly the same problem.

@lmsurpre
Copy link
Author

No, I havn't looked at this in a long while. You can check our hacked up entrypoint at https://github.com/ibmjstart/wp-bluemix-container but I'd love to hear from docker/wordpress experts on whether there's a better way.

@tianon
Copy link
Member

tianon commented Jan 9, 2018

Sorry for the massive delay!

I think #249 will probably help with this, since it allows to change the chown to a user of your choosing (such that it could match the underlying storage directly).

Since that's I think the best we can do from the image, I'm going to close. If there's more we can do to help, a new detailed issue (or PR) describing the issue, simple reproducer, and suggested change would be great!

@tianon tianon closed this as completed Jan 9, 2018
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