Topic "Problem with parameters for Put command"

Author Message
GPalmer
[View user's profile]
Donor
Joined: 2008-05-13
Posts: 10
Hi,

I am running a batch command which uploads a single file to a SFTP server with the 4.1.2 Beta. The file is transferred correctly the first time I upload the file but on subsequent uploads where it overwrites the file there is an issue. The command I am executing is:

put -nopreservetime -nopermissions QA_Export_Invivo_2008_05_09.xls

The error I receive is:

Upload of file 'QA_Export_Invivo_2008_05_09.xls' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn on 'Ignore permission errors' option.
The server does not support the operation.
Error code: 8
Error message from server: SSHServerAPI.SFTP.fxp_attrs
Request code: 9
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort

My assumption is that WinSCP should not be messing with the timestamp at all given it has been told not to preserve the timestamp. Is this the expected behavior?

Version is 4.1.2 Beta
Interface is batch
Command line is:
"C:\Program Files\WinSCP\winscp.com" /script=WinSCP_Script.scp /log=WinSCP.log

Script file (WinSCP_Script.scp) is:
open UserName:Password@IP_Address
option echo on
option batch abort
option confirm off
# Local directory listing
lls
# Remote directory listing
ls
put -nopreservetime -nopermissions QA_Export_Invivo_2008_05_09.xls
exit
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
It works for me... Can you post a log file?
_________________
Martin Prikryl
Guest




. 2008-05-13 15:58:39.195 --------------------------------------------------------------------------
. 2008-05-13 15:58:39.195 WinSCP Version 4.1.2 (Build 388) (OS 5.1.2600 Service Pack 2)
. 2008-05-13 15:58:39.195 Login time: Tuesday, May 13, 2008 3:58:39 PM
. 2008-05-13 15:58:39.195 --------------------------------------------------------------------------
. 2008-05-13 15:58:39.195 Session name: UserName@IP_Address
. 2008-05-13 15:58:39.195 Host name: IP_Address (Port: 22)
. 2008-05-13 15:58:39.195 User name: UserName (Password: Yes, Key file: No)
. 2008-05-13 15:58:39.195 Tunnel: No
. 2008-05-13 15:58:39.195 Transfer Protocol: SFTP (SCP)
. 2008-05-13 15:58:39.195 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2008-05-13 15:58:39.195 Proxy: none
. 2008-05-13 15:58:39.195 SSH protocol version: 2; Compression: No
. 2008-05-13 15:58:39.195 Bypass authentication: No
. 2008-05-13 15:58:39.195 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2008-05-13 15:58:39.195 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2008-05-13 15:58:39.195 SSH Bugs: -,-,-,-,-,-,-,-
. 2008-05-13 15:58:39.195 SFTP Bugs: -,-
. 2008-05-13 15:58:39.195 Return code variable: Autodetect; Lookup user groups: Yes
. 2008-05-13 15:58:39.195 Shell: default, EOL: 0
. 2008-05-13 15:58:39.195 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2008-05-13 15:58:39.195 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2008-05-13 15:58:39.195 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2008-05-13 15:58:39.195 Cache directory changes: Yes, Permanent: Yes
. 2008-05-13 15:58:39.195 DST mode: 1
. 2008-05-13 15:58:39.195 --------------------------------------------------------------------------
. 2008-05-13 15:58:39.195 Looking up host "IP_Address"
. 2008-05-13 15:58:39.195 Connecting to IP_Address port 22
. 2008-05-13 15:58:39.414 Server version: SSH-2.0-WS_FTP-SSH_1.1
. 2008-05-13 15:58:39.414 We claim version: SSH-2.0-WinSCP_release_4.1.2
. 2008-05-13 15:58:39.414 SSPI: acquired credentials for: usd28870@CODE1.EMI.PHILIPS.COM
. 2008-05-13 15:58:39.414 Cannot convert IP address to SPN: DNS is not trusted
. 2008-05-13 15:58:39.414 GSSKEX disabled: The operation completed successfully.

. 2008-05-13 15:58:39.414 Using SSH protocol version 2
. 2008-05-13 15:58:39.523 Using Diffie-Hellman with standard group "group14"
. 2008-05-13 15:58:39.523 Doing Diffie-Hellman key exchange with hash SHA-1
. 2008-05-13 15:58:40.102 Host key fingerprint is:
. 2008-05-13 15:58:40.102 ssh-rsa 1024 db:4f:51:98:8d:be:74:53:71:c3:9a:bb:84:f9:98:b4
. 2008-05-13 15:58:40.102 Initialised AES-256 CBC client->server encryption
. 2008-05-13 15:58:40.102 Initialised HMAC-SHA1 client->server MAC algorithm
. 2008-05-13 15:58:40.180 Initialised AES-256 CBC server->client encryption
. 2008-05-13 15:58:40.180 Initialised HMAC-SHA1 server->client MAC algorithm
! 2008-05-13 15:58:40.508 Using username "UserName".
. 2008-05-13 15:58:40.836 Prompt (6, SSH password, , &Password: )
. 2008-05-13 15:58:40.836 Using stored password.
. 2008-05-13 15:58:40.836 Sent password
. 2008-05-13 15:58:40.961 Access granted
. 2008-05-13 15:58:41.054 Opened channel for session
. 2008-05-13 15:58:41.258 Started a shell/command
. 2008-05-13 15:58:41.258 --------------------------------------------------------------------------
. 2008-05-13 15:58:41.258 Using SFTP protocol.
. 2008-05-13 15:58:41.273 Doing startup conversation with host.
> 2008-05-13 15:58:41.273 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2008-05-13 15:58:41.367 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2008-05-13 15:58:41.367 SFTP version 4 negotiated.
. 2008-05-13 15:58:41.367 We will use UTF-8 strings when appropriate
. 2008-05-13 15:58:41.367 Getting current directory name.
. 2008-05-13 15:58:41.367 Getting real path for '.'
> 2008-05-13 15:58:41.367 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2008-05-13 15:58:41.508 Type: SSH_FXP_NAME, Size: 29, Number: 16
. 2008-05-13 15:58:41.508 Real path is '/rir/qa'
. 2008-05-13 15:58:41.508 Startup conversation with host finished.
. 2008-05-13 15:58:41.508 Copying 1 files/directories to remote directory "/rir/qa"
. 2008-05-13 15:58:41.508 PrTime: No; PrRO: Yes; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 01; Resume: S (102400); CalcS: No; Mask:
. 2008-05-13 15:58:41.508 TM: M; ClAr: No; CPS: 0; ExclM(No):
. 2008-05-13 15:58:41.508 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2008-05-13 15:58:41.508 File: "Data\QA_Export_Invivo_2008_05_09.xls"
. 2008-05-13 15:58:41.523 Copying "Data\QA_Export_Invivo_2008_05_09.xls" to remote directory started.
. 2008-05-13 15:58:41.523 Binary transfer mode selected.
. 2008-05-13 15:58:41.523 Checking existence of file.
> 2008-05-13 15:58:41.523 Type: SSH_FXP_LSTAT, Size: 52, Number: 263
< 2008-05-13 15:58:41.633 Type: SSH_FXP_ATTRS, Size: 46, Number: 263
. 2008-05-13 15:58:41.633 Checking existence of partially transfered file.
> 2008-05-13 15:58:41.633 Type: SSH_FXP_LSTAT, Size: 61, Number: 519
< 2008-05-13 15:58:41.757 Type: SSH_FXP_STATUS, Size: 81, Number: 519
< 2008-05-13 15:58:41.757 Status/error code: 2
. 2008-05-13 15:58:41.757 Opening remote file.
> 2008-05-13 15:58:41.757 Type: SSH_FXP_OPEN, Size: 74, Number: 771
< 2008-05-13 15:58:41.867 Type: SSH_FXP_HANDLE, Size: 12, Number: 771
> 2008-05-13 15:58:41.867 Type: SSH_FXP_WRITE, Size: 4120, Number: 1286
. 2008-05-13 15:58:50.975 191 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2008-05-13 15:58:50.975 Type: SSH_FXP_CLOSE, Size: 12, Number: 26628
< 2008-05-13 15:58:51.006 Type: SSH_FXP_STATUS, Size: 17, Number: 25094
< 2008-05-13 15:58:51.131 Type: SSH_FXP_STATUS, Size: 17, Number: 25350
< 2008-05-13 15:58:51.256 Type: SSH_FXP_STATUS, Size: 17, Number: 25606
< 2008-05-13 15:58:51.381 Type: SSH_FXP_STATUS, Size: 17, Number: 25862
< 2008-05-13 15:58:51.506 Type: SSH_FXP_STATUS, Size: 17, Number: 26118
< 2008-05-13 15:58:51.693 Type: SSH_FXP_STATUS, Size: 17, Number: 26374
< 2008-05-13 15:58:51.693 Type: SSH_FXP_STATUS, Size: 17, Number: 26628
< 2008-05-13 15:58:51.693 Status/error code: 0
> 2008-05-13 15:58:51.693 Type: SSH_FXP_REMOVE, Size: 48, Number: 26893
< 2008-05-13 15:58:51.850 Type: SSH_FXP_STATUS, Size: 17, Number: 26893
< 2008-05-13 15:58:51.850 Status/error code: 0
> 2008-05-13 15:58:51.850 Type: SSH_FXP_RENAME, Size: 100, Number: 27154
< 2008-05-13 15:58:51.990 Type: SSH_FXP_STATUS, Size: 17, Number: 27154
< 2008-05-13 15:58:51.990 Status/error code: 0
> 2008-05-13 15:58:51.990 Type: SSH_FXP_SETSTAT, Size: 57, Number: 1033
< 2008-05-13 15:58:52.100 Type: SSH_FXP_STATUS, Size: 44, Number: 1033
< 2008-05-13 15:58:52.100 Status/error code: 8, Message: 1033, Server: SSHServerAPI.SFTP.fxp_attrs, Language:
* 2008-05-13 15:58:52.100 (ETerminal) The server does not support the operation.
* 2008-05-13 15:58:52.100 Error code: 8
* 2008-05-13 15:58:52.100 Error message from server: SSHServerAPI.SFTP.fxp_attrs
* 2008-05-13 15:58:52.100 Request code: 9
. 2008-05-13 15:58:52.100 Asking user:
. 2008-05-13 15:58:52.100 Upload of file 'QA_Export_Invivo_2008_05_09.xls' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn on 'Ignore permission errors' option. ("The server does not support the operation.
. 2008-05-13 15:58:52.100 Error code: 8
. 2008-05-13 15:58:52.100 Error message from server: SSHServerAPI.SFTP.fxp_attrs
. 2008-05-13 15:58:52.100 Request code: 9")
* 2008-05-13 15:58:52.100 (EScpSkipFile) Upload of file 'QA_Export_Invivo_2008_05_09.xls' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn on 'Ignore permission errors' option.
* 2008-05-13 15:58:52.100 The server does not support the operation.
* 2008-05-13 15:58:52.100 Error code: 8
* 2008-05-13 15:58:52.100 Error message from server: SSHServerAPI.SFTP.fxp_attrs
* 2008-05-13 15:58:52.100 Request code: 9
. 2008-05-13 15:58:52.100 Closing connection.
GPalmer
[View user's profile]
Donor
Joined: 2008-05-13
Posts: 10
Also, I just donated. Mr. Green Thanks for a great program!
GPalmer
[View user's profile]
Donor
Joined: 2008-05-13
Posts: 10
Any feedback on this issue?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
I'm sorry. I was abroad. Thanks for your donation!

Regarding the problem. It happens because you have resume support enabled. Then WinSCP uploads the file first to temporary name, renaming it to target name only after successful transfer. To preserve permissions, it then resets permissions of renamed file to permissions of original file, even if "set permissions" is off. It is for discussion if this is good behaviour or not.

However to solve your problem, disable resume support in preferences.
_________________
Martin Prikryl
GPalmer
[View user's profile]
Donor
Joined: 2008-05-13
Posts: 10
Gave it a try and it worked like a charm with the resume set to off in Preferences. That gets me by my issue. On the general question of whether it makes sense, I would think that given the user is explicitly using a switch that tells the software not to preserve permissions would argue against them being set. Either way, great software! Very Happy
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
GPalmer wrote:
On the general question of whether it makes sense, I would think that given the user is explicitly using a switch that tells the software not to preserve permissions would argue against them being set.

The switch says to "set permissions". Which I understand as opposite to "preserving existing permissions for existing files and using default system permissions for new files". Question is, how the others understand it Smile
_________________
Martin Prikryl
PiperRod
[View user's profile]

Joined: 2008-02-07
Posts: 6
Location: Baltimore, MD
I'm having the same issue, even with Resume disabled. The log file is below. Any thoughts?

. 2008-06-30 10:04:42.904 --------------------------------------------------------------------------
. 2008-06-30 10:04:42.904 WinSCP Version 4.0.6 (Build 358) (OS 5.1.2600 Service Pack 2)
. 2008-06-30 10:04:42.904 Login time: Monday, June 30, 2008 10:04:42 AM
. 2008-06-30 10:04:42.904 --------------------------------------------------------------------------
. 2008-06-30 10:04:42.904 Session name: xxx@xxx.bok.com
. 2008-06-30 10:04:42.904 Host name: xxx.bok.com (Port: 22)
. 2008-06-30 10:04:42.904 User name: xxx (Password: Yes, Key file: No)
. 2008-06-30 10:04:42.904 Tunnel: No
. 2008-06-30 10:04:42.904 Transfer Protocol: SFTP (SCP)
. 2008-06-30 10:04:42.904 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2008-06-30 10:04:42.904 Proxy: none
. 2008-06-30 10:04:42.904 SSH protocol version: 2; Compression: No
. 2008-06-30 10:04:42.904 Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2008-06-30 10:04:42.904 Ciphers: aes,blowfish,3des,WARN,des; Ssh2DES: No
. 2008-06-30 10:04:42.904 SSH Bugs: -,-,-,-,-,-,-,-
. 2008-06-30 10:04:42.904 SFTP Bugs: -,-,-
. 2008-06-30 10:04:42.904 Return code variable: Autodetect; Lookup user groups: Yes
. 2008-06-30 10:04:42.904 Shell: default, EOL: 0
. 2008-06-30 10:04:42.904 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2008-06-30 10:04:42.904 Alias LS: No, Ign LS warn: Yes, Scp1 Comp: No
. 2008-06-30 10:04:42.904 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2008-06-30 10:04:42.904 Cache directory changes: Yes, Permanent: Yes
. 2008-06-30 10:04:42.904 DST mode: 1
. 2008-06-30 10:04:42.904 --------------------------------------------------------------------------
. 2008-06-30 10:04:42.904 Looking up host "xxx.bok.com"
. 2008-06-30 10:04:42.919 Connecting to 216.60.18.99 port 22
. 2008-06-30 10:04:43.091 Server version: SSH-2.0-0
. 2008-06-30 10:04:43.091 We claim version: SSH-2.0-WinSCP_release_4.0.6
. 2008-06-30 10:04:43.091 Using SSH protocol version 2
. 2008-06-30 10:04:43.091 Doing Diffie-Hellman group exchange
. 2008-06-30 10:04:43.435 Doing Diffie-Hellman key exchange
. 2008-06-30 10:04:43.872 Host key fingerprint is:
. 2008-06-30 10:04:43.872 ssh-dss 1024 c1:be:a1:6c:3b:d5:7d:4f:b5:eb:28:1b:0a:73:7e:12
. 2008-06-30 10:04:43.872 Initialised AES-256 client->server encryption
. 2008-06-30 10:04:43.872 Initialised HMAC-SHA1 client->server MAC algorithm
. 2008-06-30 10:04:43.872 Initialised AES-256 server->client encryption
. 2008-06-30 10:04:43.872 Initialised HMAC-SHA1 server->client MAC algorithm
! 2008-06-30 10:04:44.216 Using username "xxx".
. 2008-06-30 10:04:44.309 Session password prompt (xxx@xxx.bok.com's password: )
. 2008-06-30 10:04:44.309 Using stored password.
. 2008-06-30 10:04:44.309 Sent password
. 2008-06-30 10:04:45.059 Access granted
. 2008-06-30 10:04:45.153 Opened channel for session
. 2008-06-30 10:04:45.231 Started a shell/command
. 2008-06-30 10:04:45.231 --------------------------------------------------------------------------
. 2008-06-30 10:04:45.231 Using SFTP protocol.
. 2008-06-30 10:04:45.231 Doing startup conversation with host.
> 2008-06-30 10:04:45.231 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2008-06-30 10:04:45.325 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2008-06-30 10:04:45.325 SFTP version 3 negotiated.
. 2008-06-30 10:04:45.325 We believe the server has signed timestamps bug
. 2008-06-30 10:04:45.325 We will use UTF-8 strings for status messages only
. 2008-06-30 10:04:45.325 Getting current directory name.
. 2008-06-30 10:04:45.325 Getting real path for '.'
> 2008-06-30 10:04:45.325 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2008-06-30 10:04:45.418 Type: SSH_FXP_NAME, Size: 115, Number: 16
. 2008-06-30 10:04:45.418 Real path is '/Distribution/Shared Home Directories/xxx'
. 2008-06-30 10:04:45.418 Startup conversation with host finished.
. 2008-06-30 10:04:45.418 Copying 1 files/directories to remote directory "upload/"
. 2008-06-30 10:04:45.418 PrTime: Yes; PrRO: Yes; Rght: rw-r--r--; PrR: No (Yes); FnCs: N; RIC: 01; Resume: N (102400); CalcS: No; Mask:
. 2008-06-30 10:04:45.418 TM: M; ClAr: No; ExclM(No):
. 2008-06-30 10:04:45.418 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2008-06-30 10:04:45.418 File: "c:\temp\PMNewHires.xls"
. 2008-06-30 10:04:45.418 Copying "c:\temp\PMNewHires.xls" to remote directory started.
. 2008-06-30 10:04:45.418 Binary transfer mode selected.
. 2008-06-30 10:04:45.418 Opening remote file.
> 2008-06-30 10:04:45.418 Type: SSH_FXP_OPEN, Size: 94, Number: 259
< 2008-06-30 10:04:45.559 Type: SSH_FXP_HANDLE, Size: 13, Number: 259
> 2008-06-30 10:04:45.559 Type: SSH_FXP_WRITE, Size: 1073, Number: 774
> 2008-06-30 10:04:45.559 Type: SSH_FXP_CLOSE, Size: 13, Number: 1028
> 2008-06-30 10:04:45.559 Type: SSH_FXP_SETSTAT, Size: 90, Number: 521
< 2008-06-30 10:04:46.027 Type: SSH_FXP_STATUS, Size: 26, Number: 774
< 2008-06-30 10:04:46.027 Type: SSH_FXP_STATUS, Size: 26, Number: 1028
< 2008-06-30 10:04:46.027 Status/error code: 0
< 2008-06-30 10:04:46.027 Type: SSH_FXP_STATUS, Size: 40, Number: 521
< 2008-06-30 10:04:46.027 Status/error code: 8, Message: 521, Server: Operation unsupported, Language: en
* 2008-06-30 10:04:46.027 (ETerminal) The server does not support the operation.
* 2008-06-30 10:04:46.027 Error code: 8
* 2008-06-30 10:04:46.027 Error message from server (en): Operation unsupported
* 2008-06-30 10:04:46.027 Request code: 9
. 2008-06-30 10:04:46.027 Asking user:
. 2008-06-30 10:04:46.027 Upload of file 'PMNewHires.xls' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn on 'Ignore permission errors' option. ("The server does not support the operation.
. 2008-06-30 10:04:46.027 Error code: 8
. 2008-06-30 10:04:46.027 Error message from server (en): Operation unsupported
. 2008-06-30 10:04:46.027 Request code: 9")
* 2008-06-30 10:04:49.682 (EScpSkipFile) Upload of file 'PMNewHires.xls' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn on 'Ignore permission errors' option.
* 2008-06-30 10:04:49.682 The server does not support the operation.
* 2008-06-30 10:04:49.682 Error code: 8
* 2008-06-30 10:04:49.682 Error message from server (en): Operation unsupported
* 2008-06-30 10:04:49.682 Request code: 9
. 2008-06-30 10:04:49.682 Closing connection.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
PiperRod wrote:
I'm having the same issue, even with Resume disabled. The log file is below. Any thoughts?

You also need to disable "preserve timestamp".
_________________
Martin Prikryl
PiperRod
[View user's profile]

Joined: 2008-02-07
Posts: 6
Location: Baltimore, MD
Thanks! Thank took care of it.
tictak

Guest


I am sorry I am unable to find "disable resume" and "preserve timestamp" in "preferences" . can you please provide me few more details where i can find it.
tictak

Guest


Thank you i was able to figure it out Very Happy
tictak

Guest


Sorry again. I wrote a package which calls command prompt interface to upload the files to the server. I would like to know how I can prevent the above issue using WinSCP.com instead of WinSCP.exe

I made changes to the WinSCP.exe it is working fine but not Command Prompt Interface.

Can you please help me with it.


Thanks a lot
Guest




thank you
tictak

Guest


please ignore all my posts Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad
Alex_Toronto

Guest


Hi tictak,

I have the same issue when exe working fine and com not.
Could you please share what was solution in your case?

Ilkin
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
Alex_Toronto wrote:
I have the same issue when exe working fine and com not.
Could you please share what was solution in your case?

Please start a new thread and attach log files using both .com and .exe.
_________________
Martin Prikryl
Advertisements

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License