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

virtio-fs permissions support #981

Closed
spencerpogo opened this issue Sep 10, 2023 · 2 comments
Closed

virtio-fs permissions support #981

spencerpogo opened this issue Sep 10, 2023 · 2 comments

Comments

@spencerpogo
Copy link

Is your feature request related to a problem? Please describe.
I have a directory with files owned by root. I'd like to share this filesystem so that non-admin users (or even no users at all) on the guest can read these files but not modify them.

Describe the solution you'd like
A couple ideas (I'm not sure if these would solve the problem on their own)

Describe alternatives you've considered
The host system is a container so making a read-only mount would be non-trivial (mount is blocked by seccomp and I'm not 100% clea on the security implications of allowing it).
I could run the host virtiofsd as a non-privileged host user, however, I want to keep these root owned files from being read by unprivileged users on the host.

Additional context
N/A

@viktor-prutyanov
Copy link
Collaborator

Hi

The motivation is that it is hard to reliably set the file owner to the current user ID, especially when virtiofs runs as a Windows service or when Active Directory is enabled. Please also take into account that such permissions should be mapped somehow to host POSIX permissions.

It is possible to adjust LocalUid and LocalGid, but I'm not sure this can solve your problem.

From my point of view, the problem of securing host files should be solved on the host side (virtiofsd).

@spencerpogo
Copy link
Author

OK, I suppose this is a niche use-case. I solved it by adding a startup script to my VM that reads the file off of the bridge, copies it into the C drive, makes it only readable by admins, and then removes the original file from the bridge. I suppose this solves the problem.

@spencerpogo spencerpogo closed this as not planned Won't fix, can't repro, duplicate, stale Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants