[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Qemu 9pfs sftp chrootdirectory option issue



On 10/20/2020 7:59 PM, Markus Schönhaber wrote:
20.10.20, 18:49 +0200, john doe:

Debians,

According to (1):

"ChrootDirectory
Specifies a path to chroot(2) to after authentication. This path, and
all its components, must be root-owned directories that are not writable
by any other user or group. After the chroot, sshd(8)"


i'm using the Qemu's 9p implimentation (mapped mode) to share files
between guests and host, (2) due to lack of space on the guest.
This mountpointis not owned by root and I'm  at a lost on how to have
sftp access to that guest while pointing the chroot directory directive
to that share.

How about moving the 9pshare to a root-owned directory and pointing the
ChrootDirectory there, for example:
share -> /all/owned/by/root/9pshare
ChrootDirectory -> /all/owned/by/root


Thank you for this.

I can only do that if 'passthrough' is used, as I don't realy understand
the implecations of running qemu as root, I was hoping to find a way
with 'mapped'.
'mapped' requires that the directory on the host is set to the group and
user used by qemu, 'libvirt-qemu in this case.

--
John Doe


Reply to: