question

YoungAllenContractorOCIO-0339 avatar image
0 Votes"
YoungAllenContractorOCIO-0339 asked YoungAllenContractorOCIO-0339 commented

FTP vs SFTP question

Hi, All:

I run into some weird issue here. I set up both FTP and SFTP sites on my Windows 2019 server. The virtual directory of both sites were D:/App/FTP_Site1 and D:/App/SFTP_Site1. When I published my static content files onto the server through FTP, all of files were transferred correctly into the folder of D://App/FTP_Site1. However, when I tried to repeat the same process using SFTP, all of my files went to C://Users//myName folder instead of D://App/SFTP_Site1 folder.

Can anyone explain to me why?

Thank you,

windows-server-iis
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MotoX80 avatar image
0 Votes"
MotoX80 answered

I set up both FTP and SFTP sites on my Windows 2019 server. The virtual directory of both sites were D:/App/FTP_Site1 and D:/App/SFTP_Site1.

Just to verify that we're on the same page with terminology.... IIS supports FTP and FTPS.

SFTP requires that you install the OpenSSH feature.

To set the home directory in SFTP, modify C:\ProgramData\ssh\sshd_config with notepad. Set the root directory like this.

 ChrootDirectory D:/App/SFTP_Site1

Then recycle the OpenSSH SSH Server service.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

YoungAllenContractorOCIO-0339 avatar image
0 Votes"
YoungAllenContractorOCIO-0339 answered

MotoX80:

Thank you so much for your reply, I don't see C:\ProgramData\ssh\sshd_config files at all under C: drive. Do I miss anything? I can see Program Files, Program Files (x86), Windows, Users, etc.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

YoungAllenContractorOCIO-0339 avatar image
0 Votes"
YoungAllenContractorOCIO-0339 answered YoungAllenContractorOCIO-0339 commented

Never mind, I figured out how to find the file. I will make the changes and let you all know the results. thanks

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@YoungAllenContractorOCIO-0339 Has your problem been solved?

0 Votes 0 ·

Sam, I figured out what the issue was. I had to update the SSHd-config file to change the default directory.

0 Votes 0 ·