-nopermissions option not working

Advertisement

geo
Guest

-nopermissions option not working

I'm trying to script some commands using winscp so I can have a user run a .cmd windows batch file but some of the winscp commands don't seem to be working. It copies the file but it returns an exit code of 1 and an error because it's trying to set the permissions and/or timestamp on the remote server. Here is the command I'm running and the log output. I am running version 4.2.3 of winscp.


.cmd file contents:

@echo on
C:\PROGRA~1\WinSCP3\WinSCP.com /script=G:\Dacm\temp\copy_DA_tnsnames.txt > G:\DACM\TEMP\copy_DA_tnsnames.log


copy_DA_tnsnames.txt contents:

option batch on
option confirm off
open username@servername
cd /home/dataarch
option transfer ascii
put -nopermissions G:\DACM\TEMP\DA_tnsnames.ora
exit

Logfile output:
batch on
confirm off
Searching for host...
Connecting to host...
Authenticating...
Using username "username".
Authenticating with public key "xxxxxxxx" from agent.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] gm625270@devapp0
/home/dataarch
transfer ascii
G:\DACM\TEMP\DA_tnsnames.ora | 1 KiB | 0.0 KiB/s | ascii | 100%
Upload of file 'DA_tnsnames.ora' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn on 'Ignore permission errors' option.
Permission denied.
Error code: 3
Error message from server: Permission denied
Request code: 9
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum