KS10 Posted May 17, 2019 Share Posted May 17, 2019 Hardlink/Junction not working when chroot all users to c:/share dir in Windows OpenSSH Server 2019. Link Created mklink /d E "E:" mklink /d F "F:" Entry in sshd_config file ChrootDirectory c:/share Now When I connect to my Server via SCP using SFTP. I landed on the Share Dir. I am able to browse E and F Drive from Share Dir. However I am NOT able to view or copy any file for E & F . What I figured out is that via Hardlink or junction Link I can only see the Dir, But I can't view the content of the file and can't even copy the file. My Requirement is to Use Windows 2019 Server with OPENSSH Integrated with Active Directory Create hard Link for 5 Hard drive (2Tb Each ) to Share Folder So when user connect via SCP, then land in C:/Share Dir, and then from their they can go D,E,F,G Drive I need the SSH functionality integrated with active directory to authenticate users Link to comment https://www.neowin.net/forum/topic/1382901-issue-hardlinkjunction-not-working-when-chroot-all-users-to-cshare-dir-in-windows-openssh-server-2019/ Share on other sites More sharing options...
DevTech Posted May 27, 2019 Share Posted May 27, 2019 On 17/05/2019 at 21:40, KS10 said: Hardlink/Junction not working when chroot all users to c:/share dir in Windows OpenSSH Server 2019. Link Created mklink /d E "E:" mklink /d F "F:" Entry in sshd_config file ChrootDirectory c:/share Now When I connect to my Server via SCP using SFTP. I landed on the Share Dir. I am able to browse E and F Drive from Share Dir. However I am NOT able to view or copy any file for E & F . What I figured out is that via Hardlink or junction Link I can only see the Dir, But I can't view the content of the file and can't even copy the file. My Requirement is to Use Windows 2019 Server with OPENSSH Integrated with Active Directory Create hard Link for 5 Hard drive (2Tb Each ) to Share Folder So when user connect via SCP, then land in C:/Share Dir, and then from their they can go D,E,F,G Drive I need the SSH functionality integrated with active directory to authenticate users Expand It has been a while since I did this so my memory is not pulling up a direct answer for you but most likely it is because there are about 3 or 4 or maybe more ways to create low level Junction Points in Windows and most likely you used the wrong one! "With great power comes great complications" so the most sophisticated O/S on Planet Earth has a crazy list of many ways to do the same things all for some specific very focused reason. But when you get the Junction Points just right even to internal O/S bits, they survive all sorts of major O/S updates! Link to comment https://www.neowin.net/forum/topic/1382901-issue-hardlinkjunction-not-working-when-chroot-all-users-to-cshare-dir-in-windows-openssh-server-2019/#findComment-598449156 Share on other sites More sharing options...
Malone3V Posted June 13, 2019 Share Posted June 13, 2019 On 27/05/2019 at 20:01, DevTech said: It has been a while since I did this so my memory is not pulling up a direct answer for you but most likely it is because there are about 3 or 4 or maybe more ways to create low level Junction Points in Windows and most likely you used the wrong one! "With great power comes great complications" so the most sophisticated O/S on Planet Earth has a crazy list of many ways to do the same things all for some specific very focused reason. But when you get the Junction Points just right even to internal O/S bits, they survive all sorts of major O/S updates blue stacks Expand Instead of configuring the OpenSSH server for each user individually we will create a new group and add all our chrooted users to this group. Link to comment https://www.neowin.net/forum/topic/1382901-issue-hardlinkjunction-not-working-when-chroot-all-users-to-cshare-dir-in-windows-openssh-server-2019/#findComment-598455006 Share on other sites More sharing options...
Recommended Posts