Mic92/nixos-shell

Odd file permissions?

chrissound opened this issue · 1 comments

Apologies I don't really expect the maintainers of the software to respond to this, just more for my own reference and if I or anyone else finds an answer.


When I create a file in a mounted directory, the permissions seem a bit odd. It seems to be created with the userid of the parent host system.

Which means if I try to edit files with nvim it starts complaining about not being able to write a backup file.

From within the guest:

touch example
touch: setting times of 'example': Permission denied

How could I shared a mounted directory while also allowing any necessary permission to write/create files?

Mic92 commented

qemu can only write files as the user it was started, which is what's happening if you share files with 9p. If you wanted to share files with arbitrary permissions you would need something like NFS, where you directly talk to the host kernel. Not quite sure about touch, but maybe it tries to use some systemcall that is not implemented by this filesystem?