Jailroot problem in Ubuntu with Visual Studio Remote SSH

Job ID: 36486355

Budget: $15 – $25 USD

Hello
I have jailed the user with chroot, however, everything is fine until need to connect with visual studio.
Visual Studio trying to create the workspace folder inside the chroot directory and he can't because chroot directory is set to root user.
This is why failed to ssh, if i give write permissions to the chroot home folder for example /home/developer1 then ssh gives me this error: client_loop: send disconnect: Connection reset
If i change the folder group to www-data or other than root, as well SSH fail with the same error.
But if the /home/developer1 is set with root user and 755. ssh is working properly but VS can't ssh because he can't write to /home/developer1

Any approach to fix this?
Related categories: Linux Ubuntu