Topic "-nopermissions option not working"

Author Message


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\ /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

Logfile output:
batch on
confirm off
Searching for host...
Connecting to host...
Using username "username".
Authenticating with public key "xxxxxxxx" from agent.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] gm625270@devapp0
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
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24736
Location: Prague, Czechia
Have you tried adding -nopreservetime?
Martin Prikryl

You can post new topics in this forum

Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License