28.10.20, 19:19 +0100 john doe: > On 10/28/2020 6:51 PM, Markus Schönhaber wrote: >> 28.10.20, 18:30 +0100 john doe: > >>> $ ls -dl /srv/sftp/9p >>> drwx------ 8 root root ... /srv/sftp/9p >> >> Isn't "9p" supposed to be the share directory? If it is, why is it owned >> by root and has these restrictive permissions? >> > > Because of the chrootdirectory directive (see above).
That's why I suggested (twice!) to set the ChrootDirectory to the directory that *contains* the share directory. >> Assuming >> ChrootDirectory -> /srv/sftp -> make this root:root, drwxr-xr-x >> share -> /srv/sftp/9p -> make this libvirt-qemu:libvirt-qemu, drwxr-xr-x >> > > If I do that, I can't even connect to the sftp server: > > $ sftp sftp9p > packet_write_wait: Connection to ::1 port 22: Broken pipe > Connection closed The logs will probably tell you what exactly is wrong. -- Regards mks