Traverse/execute perm required for changing local directory?
We use WinSCP.exe in a Windows scheduled task to move some files from a shared drive to an SFTP server. I have discovered that in order for WinSCP to successfully change local directory (lcd), the Traverse NTFS permission is required on the local directory for the user who is running the WinSCP scheduled task. I confirmed this by running the WinSCP.com console application interactively and issuing lcd "the-directory-path"; the message Error changing directory was returned. Is this expected behaviour? I checked how the built-in Windows FTP behaves and it does not give an error; issuing lcd "the-directory-path" appears to successfully change directory.
Using WinSCP 5.2.1 on Windows 7 SP1 64-bit
Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /log="G:\CCS\Content\Bibliographic Services\Acquisitions\WinSCP-invoice-move.log" /command "option batch abort" "option confirm off" "open libapp0" "lcd ""G:\CCS\Content\Bibliographic Services\Acquisitions\EDI Invoices""" "cd /exlibris/aleph/u19_1/yor50/edi/in/edi_incoming" "put -delete *" "exit"
Error in log:
. 2013-01-04 10:39:12.257 Getting current directory name.
. 2013-01-04 10:39:12.257 Startup conversation with host finished.
< 2013-01-04 10:39:12.257 Script: Active session: [1] libapp0
> 2013-01-04 10:39:12.257 Script: lcd "G:\CCS\Content\Bibliographic Services\Acquisitions\EDI Invoices"
< 2013-01-04 10:39:12.257 Script: Error changing directory to 'G:\CCS\Content\Bibliographic Services\Acquisitions\EDI Invoices'.
. 2013-01-04 10:39:12.257 Script: Failed
. 2013-01-04 10:39:12.257 Script: Exit code: 1
. 2013-01-04 10:39:12.257 Closing connection.
. 2013-01-04 10:39:12.273 Sending special code: 12
. 2013-01-04 10:39:12.273 Sent EOF message
Thanks!
Using WinSCP 5.2.1 on Windows 7 SP1 64-bit
Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /log="G:\CCS\Content\Bibliographic Services\Acquisitions\WinSCP-invoice-move.log" /command "option batch abort" "option confirm off" "open libapp0" "lcd ""G:\CCS\Content\Bibliographic Services\Acquisitions\EDI Invoices""" "cd /exlibris/aleph/u19_1/yor50/edi/in/edi_incoming" "put -delete *" "exit"
Error in log:
. 2013-01-04 10:39:12.257 Getting current directory name.
. 2013-01-04 10:39:12.257 Startup conversation with host finished.
< 2013-01-04 10:39:12.257 Script: Active session: [1] libapp0
> 2013-01-04 10:39:12.257 Script: lcd "G:\CCS\Content\Bibliographic Services\Acquisitions\EDI Invoices"
< 2013-01-04 10:39:12.257 Script: Error changing directory to 'G:\CCS\Content\Bibliographic Services\Acquisitions\EDI Invoices'.
. 2013-01-04 10:39:12.257 Script: Failed
. 2013-01-04 10:39:12.257 Script: Exit code: 1
. 2013-01-04 10:39:12.257 Closing connection.
. 2013-01-04 10:39:12.273 Sending special code: 12
. 2013-01-04 10:39:12.273 Sent EOF message
Thanks!
Last edited by Jimbob9 on 2013-01-04 23:42; edited 5 times in total