-
-
Notifications
You must be signed in to change notification settings - Fork 126
Description
what
- The user's shell inside Geodesic runs as
root - The script that launches Geodesic bind-mounts the host user's
$HOMEto/localhostto provide access to configuration files and allow for editing of host files - Depending on the way Docker is set up, it is possible that files created under
/localhostfrom within Geodesic will be set to the same owner UID and GID (that is, owned byroot) on the host as they have within Geodesic. - This appears to affect users running the Docker daemon as
rootunder Linux or Windows Subsystem for Linux (WSL). It does not affect Docker for Mac, nor does it affect Docker for Linux when run in "rootless" mode.
Resolution
The recommended solution for Linux users is to run Docker in "rootless" mode. In this mode, the Docker daemon runs as the host user (rather than as root) and files created by the root user in Geodesic are owned by the host user on the host. Not only does this configuration solve this issue, but it provides much better system security overall.
Geodesic, as of v0.151.0, provides an alternative solution: BindFS mapping of file owner and group IDs. To enable this solution in Geodesic v4.0.0 or later, either set the shell environment variable MAP_FILE_OWNERSHIP=true (can be set in launch-options.sh) or launch Geodesic with the command line option --map-file-ownership. (To enable this solution in Geodesic prior to version 4.0.0, either set (and export) the shell environment variable GEODESIC_HOST_BINDFS_ENABLED=true or launch Geodesic with the command line option --geodesic-host-bindfs-enabled.) When this option is enabled, Geodesic will output
# Enabling BindFS mapping of file system owner and group ID.
among its startup messages. Note that if you enable BindFS mapping while running in "rootless" mode, it will actually cause files on the host to be created with a different owner and group, not root and not the host user. If you see this behavior, do not use BindFS mapping.