-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change nfs share root mapping, closes #50
- Loading branch information
Showing
2 changed files
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ad08a42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nlf This now causes problems as files created from within the VM are not deletable by the user that ran the container. It requires
sudo
calls.ad08a42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is a universally good solution here:
-mapall=<host_uid>:<host_gid>
(e.g. 501:20) has the nice property of files in ~ remaining owned by you (and thus nicely deletable). There is no pollution of the host with ids from another host that do not even correspond to your host's /etc/passwd & /etc/group. The downside is your host user's uid/gid leaks to the container and all the files inside the container will be forced to use it. You cannot chown. Even if you use the popular trick of having your container UID/GID match the host, permission checking will not work OK, since it's done server-side, and there it gets mapped to your host uid (in other words, within the container, "alice" will be able to write to a directory shared from the host, even if that directory seems to be owned by "bob" and has 700). Weird stuff.-maproot=root:wheel
will make the container behave more predictably re. permissions, but the host will get polluted by random uids/gids that the system does not even know about.The ultimate solution would be to keep the files on the host owned by you, but somehow store the guest uids/gids (e.g. in extended attributes) and present those to containers.
Another somewhat-related observation: once you've started dlite, the exports entry does not get reset (even if you purge & reinstall dlite) unless you manually delete
/etc/exports
, so it's possible that you're using 1.1.3 but still have-mapall
there from a previous version (this caused me some confusion just now).ad08a42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have altered my
/etc/exports
file to use myuid
andguid
instead. In order to make it work, after doing the changes I ransudo nfsd update
and restarteddlite
.