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

Cannot use NFS backed mount for container data #11

Closed
deed02392 opened this issue Jul 5, 2017 · 4 comments
Closed

Cannot use NFS backed mount for container data #11

deed02392 opened this issue Jul 5, 2017 · 4 comments

Comments

@deed02392
Copy link
Contributor

Due to the chown operation required to execute the container, it is not possible to use an nfs mount point to store configuration data.

I am using CoreOS with Docker and SickGear and using an NFS mount for the /config mountpoint. Due to no-root-squash option on NFS, which is an essential security mechanism when sharing files with NFS, the root chown operation attempted by this Docker container fails, causing the software to stop.

@ressu
Copy link
Contributor

ressu commented Jul 7, 2017

I never thought of that scenario. I think the best way to deal with this situation is to check if the configuration and configuration directory is already owned by the destination user. This still leaves a possibility of having some files misconfigured, but I don't think it's always the best idea to stack up different environment variables.

@deed02392
Copy link
Contributor Author

I agree that's probably the best solution if you insist on implementing permissions logic in the container.

@deed02392
Copy link
Contributor Author

Fixed in PR: #12

It checks for perms before trying to chown, and also fixes the config.ini ownership issue (you cannot copy a file to an NFS store as root, because root is not allowed to create files on an NFS share unless no_root_squash is on, which it shouldn't be).

@ressu
Copy link
Contributor

ressu commented Jul 10, 2017

Very nice. I'll add a few comments to the PR, but looking good.

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

No branches or pull requests

3 participants