The Wayback Machine - https://web.archive.org/web/20200608072824/https://github.com/canonical/multipass/issues/1200
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

Allow specifying wildcards (`*`) for `--[ug]id-map` on mounts #1200

Open
dhruvrajan opened this issue Nov 30, 2019 · 4 comments
Open

Allow specifying wildcards (`*`) for `--[ug]id-map` on mounts #1200

dhruvrajan opened this issue Nov 30, 2019 · 4 comments

Comments

@dhruvrajan
Copy link

@dhruvrajan dhruvrajan commented Nov 30, 2019

What are the host-side ids to use when running multipass mount? I am accessing files through a user other than "multipass".

Without specifying -u and -g, I see from "multipass info", the following map: "UID map: -2:default". From the code, it looks like both the host and instance ids should be unsigned integers.

@Saviq Saviq changed the title Can't specify uid-map and gid-map for mounts on Windows 10? Can't specify uid-map and gid-map for mounts on Windows Dec 2, 2019
@Saviq
Copy link
Collaborator

@Saviq Saviq commented Dec 2, 2019

Hi @dhruvrajan,

You're right, it's a missing case at the moment. We default to a mapping of "map all uids/gids to the default user", but we don't support it on the command line.

@Saviq Saviq changed the title Can't specify uid-map and gid-map for mounts on Windows Allow specifying wildcards (`*`) for `--[ug]id-map` on mounts Dec 2, 2019
@dhruvrajan
Copy link
Author

@dhruvrajan dhruvrajan commented Dec 2, 2019

Thanks for the quick response! I'm happy to take a look at this and see if I can help.

@Saviq
Copy link
Collaborator

@Saviq Saviq commented Dec 3, 2019

@dhruvrajan great! This is where you'd need to look: mount.cpp and then sftp_server.cpp#L302.

@dbotham
Copy link

@dbotham dbotham commented Mar 17, 2020

Could this be a bug?

I am running Windows 10 and see the same issue:

Mounts: c:/ => /c-drive
            UID map: -2:default
            GID map: -2:default

It looks like the cause of processes that try to access files in the mount getting 'permission denied' for Read access to files. Here is syslog when I start named with a config file in mount:

Mar 17 14:28:14 mysys named[2300]: loading configuration from '/c-drive/local/named.conf'
Mar 17 14:28:14 mysys named[2300]: open: /c-drive/local/named.conf: permission denied
Mar 17 14:28:14 mysys kernel: [ 2250.379791] audit: type=1400 audit(1584473294.206:27): apparmor="DENIED" operation="open" profile="/usr/sbin/named" name="/c-drive/local/named.conf" pid=2300 comm="isc-worker0000" requested_mask="r" denied_mask="r" fsuid=0 ouid=1000

I have read #1346 (and others covered by 'is:issue is:open map' ), and I don't think they are the issue.

I don't code C or it's variants, but, will be happy to collaborate from a test bed perspective if I can.

hth,

David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.