VMware Cloud Community
kjhsiao
Contributor
Contributor

VCSA 7.0 SFTP backup fail

Hi all,
I want to use SFTP backup in the VCSA. The SFTP server is windows system. The backup folder on D drive. 
I used this path in the VCSA 
sftp://x.x.x.x:22/D$/NWBACKUP/ 
But it's not working. 
This is failed message. 
[FtpStorageIOLib::_sftp_mkdir:FtpStorageIOLib.py:161] WARNING: Parent dir sftp://x.x.x.x:22/D$ create failed. RC: 21 Err: curl: (21) mkdir command faile: Permission denied

If I used WinSCP to access same SFTP, it can direct access to folder on D drive. 
May I know how to change path for different drive?  

Labels (1)
0 Kudos
1 Reply
fabio1975
Commander
Commander

Ciao 

probably the problem lies in the default root of the ssh service active on the backup target windows server
You should make the following change on the windows server


added below into C:\ProgramData\ssh\sshd_config work for me, the only thing is need restart service "OpenSSH SSH Server"

Match User <user>
ChrootDirectory "<pathroot>"

Source of information:

https://github.com/PowerShell/Win32-OpenSSH/issues/730#issuecomment-977616358

 

 


Where for user put the user you do SFTP with and in pathroot put d:\NWBACKUP

The error you see is that the SFTP tries to create a D $ directory where it cannot (the D $ is not the system share as you think)

I have tried and it works

 

 

Fabio

Visit vmvirtual.blog
If you're satisfied give me a kudos

0 Kudos