Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

NFS squash root access to local user #12

Closed
yenif opened this issue Mar 16, 2015 · 3 comments
Closed

NFS squash root access to local user #12

yenif opened this issue Mar 16, 2015 · 3 comments

Comments

@yenif
Copy link
Contributor

yenif commented Mar 16, 2015

Currently unfs is set to not munge UIDs leading to the vm having real root access to the shared filesystem and any created files thus having root UID/GID (particularly annoying around npm install or bundle install into a subdirectory).

Looks like unfs supports root squashing with anonuid and anongid (http://linux.die.net/man/8/unfsd) which we could set to the executing user for this export. Personally I'd go as far to turn on all_squash to also avoid any other UID pollution from the vm, but that could potentially interfere with some future use case (create as non root with only uid read, next read would probably fail with a wrong uid).

Looks like this should be a pretty easy change, will try to throw something up this afternoon.

@codekitchen
Copy link
Owner

Yes this is intentional, to match how the docker daemon works with permission when working on linux directly. I experimented heavily with root squashing, and with all_squash, but various docker images run into issues if they can't create files with user ids and group ids that don't exist on the host system.

@yenif
Copy link
Contributor Author

yenif commented Mar 16, 2015

Ah, well that's annoying...

@codekitchen
Copy link
Owner

I'm going to close this for now -- agree that it's annoying, I hate having all those files on the host OS X filesystem owned by root and other non-existent users, but don't have a better solution for now. I know that docker is looking to add user mapping support, I bet the situation will improve once that's released and image creators start adopting it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants