SFTP-Error listing directory -> No such file or directory -> Error Code 2

Advertisement

ZAJDAN
Joined:
Posts:
2
Location:
CzechRepublic

SFTP-Error listing directory -> No such file or directory -> Error Code 2

Hello
I have windows scheduler script for winSCP:
/log=c:\Users\Administrator\winscp.log /command "open sftp://sqlbackup:mypassword@192.168.6.116/" "synchronize remote C:\database_backups  /mnt/databox/sapDatabase-backup/sqlbackup" "exit"

but in log I see this problem:
2017-06-06 14:35:12.333 Error listing directory '/mnt/databox/sapDatabase-backup/sqlbackup'. ("No such file or directory.
. 2017-06-06 14:35:12.333 Error code: 2
. 2017-06-06 14:35:12.333 Error message from server: No such file")
< 2017-06-06 14:35:12.334 Script: Error listing directory '/mnt/databox/sapDatabase-backup/sqlbackup'.
< 2017-06-06 14:35:12.334 Script: No such file or directory.
< 2017-06-06 14:35:12.334 Error code: 2
< 2017-06-06 14:35:12.334 Error message from server: No such file
. 2017-06-06 14:35:12.334 Script: Failed
. 2017-06-06 14:35:12.334 Script: Exit code: 1
. 2017-06-06 14:35:12.335 Closing connection.
. 2017-06-06 14:35:12.335 Sending special code: 12
. 2017-06-06 14:35:12.335 Sent EOF message

when I connect to the directory via GUI, so I am successfully connected and can create/delete files/directory

on linux the user sqlbackup is chrooted and has shell /bin/false

on server in auth.log is:
systemd-logind[712]: New session 37 of user sqlbackup.
systemd: pam_unix(systemd-user:session): session opened for user sqlbackup by (uid=0)
linux-zdenek sshd[16519]: pam_unix(sshd:session): session closed for user sqlbackup
linux-zdenek systemd-logind[712]: Removed session 37.
linux-zdenek systemd: pam_unix(systemd-user:session): session closed for user sqlbackup

Thank You for any hint
Regards ZAJDAN

Reply with quote

Advertisement

ZAJDAN
Joined:
Posts:
2
Location:
CzechRepublic

Re: SFTP-Error listing directory -> No such file or directory -> Error Code 2

SOLVED...
because I use chroot via sshd_config I can not use the whole path but only what is inside the chroot...so in my case
/log=c:\Users\Administrator\winscp.log /command "open sftp://sqlbackup:mypassword@192.168.6.116/" "synchronize remote C:\database_backups /sqlbackup" "exit"

thanx for Tuxik(CZ) :_)

Reply with quote

Advertisement

You can post new topics in this forum