Closed onny closed 8 months ago
Hm changing uid and gid doesn't quite seems to work with 9p. Would it be possible to switch to virtiofs?
My current workaround with bindfs:
systemd.mounts = [
{
what = "/var/lib/nextcloud/calendar";
where = "/var/lib/nextcloud/store-apps/calendar";
type = "fuse.bindfs";
options = "uid=997,gid=997";
wantedBy = [ "multi-user.target" ];
enable = true;
}
];
Have you tried setting these mount options on the virtio-9p mounts?
dfltuid attempt to mount as a particular uid
dfltgid attempt to mount with a particular gid
Those are coming from here: https://www.kernel.org/doc/Documentation/filesystems/9p.txt
There is also X-mount.idmap= otherwise: https://github.com/brauner/mount-idmapped
Hm didn't have any luck with these two approaches. Thank you for sharing anyway. Currently I'm trying to use virtiofs but uid and gid mapping as non-root user doesn't seem so simple yet
Would be interesting to have support for this in nixos-shell
Afaik This is not possible with 9p unfortunately.
Hey, I'm looking to configure permissions of a 9p mount point. Usually they are owned by root inside the nixos-shell VM. How can I change the ownership?
What I can do currently is:
or alternaivley
Best regards Jonas