can create remote file using command line interface

Advertisement

gersepa
Guest

can create remote file using command line interface

Can create folder in non-root directory. getting error 2 a show below:
Searching for host...
Connecting to host...
Authenticating...
Using username "yamana".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] yamana@w23.sabahosted.com
winscp> lcd d:\test\interfaces\lms
D:\TEST\INTERFACES\LMS
winscp> cd dev
/yamana/dev
winscp> cd inbound
/yamana/dev/inbound
winscp> mput *.csv
int_org.csv | 0 KiB | 0.0 KiB/s | binary | 0%
Cannot create remote file '/yamana/dev/inbound/int_org.csv'.
No such file or directory.
Error code: 2
Error message from server: No such file
Request code: 3
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort
winscp> cd ..
/yamana/dev
winscp> cd ..
/yamana
winscp> mput *.csv
int_org.csv | 8 KiB | 13.8 KiB/s | binary | 100%
int_organization_08072013 | 970 KiB | 320.6 KiB/s | binary | 100%
int_organization_272013.c | 8 KiB | 275.5 KiB/s | binary | 100%
int_org_12072013.csv | 22 KiB | 263.4 KiB/s | binary | 100%
int_person_AR.csv | 19 KiB | 241.0 KiB/s | binary | 100%
int_person_AR_22072013.cs | 220 KiB | 230.9 KiB/s | binary | 100%
Job_Type220713.csv | 0 KiB | 209.8 KiB/s | binary | 100%
Job_Type_12072013.csv | 0 KiB | 191.8 KiB/s | binary | 100%
job_type_AR_08072013.csv | 17 KiB | 180.2 KiB/s | binary | 100%
winscp>

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,468
Location:
Prague, Czechia

Re: can create remote file using command line interface

Does the /yamana/dev/inbound really exist? Can you show output of ls /yamana/dev?

Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.

Reply with quote

RavenTara
Guest

I believe I'm having a similar issue:

winscp> put C:\Test\testfile.txt /FolderName/*.*
C:\Test\testfile.txt | 0 KiB | 0.0 KiB/s | binary | 0%
Cannot create remote file '/FolderName/testfile.txt'.
No such file or directory.
Error code: 2
Error message from server: No such file.
Request code: 3
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort



LOG FILE:
. 2013-09-12 13:00:44.424 --------------------------------------------------------------------------
. 2013-09-12 13:00:44.424 WinSCP Version 5.1.5 (Build 3261) (OS 6.1.7601 Service Pack 1)
. 2013-09-12 13:00:44.424 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2013-09-12 13:00:44.424 Local account: EXPRESSNET\russell.bruechert
. 2013-09-12 13:00:44.424 Working directory: C:\Test
. 2013-09-12 13:00:44.424 Process ID: 1668
. 2013-09-12 13:00:44.424 Command-line: "c:\Program Files (x86)\WinSCP\WinSCP.exe" /console=515 /consoleinstance=_8884_515 "-log=C:\Test\Log.txt"
. 2013-09-12 13:00:44.424 Time zone: Current: GMT+10, Standard: GMT+10, DST: GMT+11, DST Start: 6/10/2013, DST End: 7/04/2013
. 2013-09-12 13:00:44.424 Login time: Thursday, 12 September 2013 1:00:44 PM
. 2013-09-12 13:00:44.424 --------------------------------------------------------------------------
. 2013-09-12 13:00:44.424 Session name: username@ftpserver (Modified stored session)
. 2013-09-12 13:00:44.424 Host name: ftpserver (Port: 22)
. 2013-09-12 13:00:44.424 User name: username (Password: Yes, Key file: No)
. 2013-09-12 13:00:44.424 Tunnel: No
. 2013-09-12 13:00:44.424 Transfer Protocol: SFTP
. 2013-09-12 13:00:44.424 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2013-09-12 13:00:44.424 Proxy: none
. 2013-09-12 13:00:44.424 SSH protocol version: 2; Compression: No
. 2013-09-12 13:00:44.424 Bypass authentication: No
. 2013-09-12 13:00:44.424 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2013-09-12 13:00:44.424 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2013-09-12 13:00:44.424 SSH Bugs: A,A,A,A,A,A,A,A,A,A
. 2013-09-12 13:00:44.424 Return code variable: Autodetect; Lookup user groups: A
. 2013-09-12 13:00:44.424 Shell: default
. 2013-09-12 13:00:44.424 EOL: 0, UTF: 2
. 2013-09-12 13:00:44.424 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2013-09-12 13:00:44.424 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2013-09-12 13:00:44.424 Local directory: default, Remote directory: /, Update: Yes, Cache: Yes
. 2013-09-12 13:00:44.424 Cache directory changes: Yes, Permanent: Yes
. 2013-09-12 13:00:44.424 DST mode: 1; Timezone offset: 0h 0m
. 2013-09-12 13:00:44.424 --------------------------------------------------------------------------
. 2013-09-12 13:00:44.424 Looking up host "ftpserver"
. 2013-09-12 13:00:44.440 Connecting to 203.134.124.35 port 22
. 2013-09-12 13:00:44.440 Server version: SSH-2.0-1.82 sshlib: sshlibSrSshServer 1.00
. 2013-09-12 13:00:44.440 Using SSH protocol version 2
. 2013-09-12 13:00:44.440 We claim version: SSH-2.0-WinSCP_release_5.1.5
. 2013-09-12 13:00:44.440 Doing Diffie-Hellman group exchange
. 2013-09-12 13:00:44.658 Doing Diffie-Hellman key exchange with hash SHA-1
. 2013-09-12 13:00:44.814 Verifying host key rsa2 0x11,0xc3353de9298a8ae959b339b47c76670dc57e9ccf31d891c16bfdbc650bf9093fcbc1ef547bc6c5a0... with fingerprint ssh-rsa 1024 d0:49:b0:b7:81:18:4c:77:c2:68:7b:f1:cc:72:37:f1
. 2013-09-12 13:00:44.814 Host key matches cached key
. 2013-09-12 13:00:44.814 Host key fingerprint is:
. 2013-09-12 13:00:44.814 ssh-rsa 1024 d0:49:b0:b7:81:18:4c:77:c2:68:7b:f1:cc:72:37:f1
. 2013-09-12 13:00:44.814 Initialised AES-256 CBC client->server encryption
. 2013-09-12 13:00:44.814 Initialised HMAC-SHA1 client->server MAC algorithm
. 2013-09-12 13:00:44.814 Initialised AES-256 CBC server->client encryption
. 2013-09-12 13:00:44.814 Initialised HMAC-SHA1 server->client MAC algorithm
! 2013-09-12 13:00:44.986 Using username "username".
. 2013-09-12 13:00:44.986 Prompt (7, SSH password, , &Password: )
. 2013-09-12 13:00:44.986 Using stored password.
. 2013-09-12 13:00:44.986 Sent password
. 2013-09-12 13:00:45.080 Access granted
. 2013-09-12 13:00:45.080 Opened channel for session
. 2013-09-12 13:00:45.204 Started a shell/command
. 2013-09-12 13:00:45.204 --------------------------------------------------------------------------
. 2013-09-12 13:00:45.204 Using SFTP protocol.
. 2013-09-12 13:00:45.204 Doing startup conversation with host.
> 2013-09-12 13:00:45.204 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2013-09-12 13:00:45.204 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2013-09-12 13:00:45.204 SFTP version 5 negotiated.
. 2013-09-12 13:00:45.220 We will use UTF-8 strings when appropriate
. 2013-09-12 13:00:45.220 Changing directory to "/".
. 2013-09-12 13:00:45.220 Getting real path for '/'
> 2013-09-12 13:00:45.220 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2013-09-12 13:00:45.220 Type: SSH_FXP_NAME, Size: 75, Number: 16
. 2013-09-12 13:00:45.220 Real path is '/'
. 2013-09-12 13:00:45.220 Trying to open directory "/".
> 2013-09-12 13:00:45.220 Type: SSH_FXP_LSTAT, Size: 14, Number: 263
< 2013-09-12 13:00:45.220 Type: SSH_FXP_ATTRS, Size: 66, Number: 263
. 2013-09-12 13:00:45.220 Getting current directory name.
. 2013-09-12 13:00:45.220 Startup conversation with host finished.
< 2013-09-12 13:00:45.220 Script: Active session: [1] username@ftpserver
> 2013-09-12 13:00:49.494 Script: ls
. 2013-09-12 13:00:49.494 Listing directory "/".
> 2013-09-12 13:00:49.494 Type: SSH_FXP_OPENDIR, Size: 10, Number: 523
< 2013-09-12 13:00:49.494 Type: SSH_FXP_HANDLE, Size: 17, Number: 523
> 2013-09-12 13:00:49.494 Type: SSH_FXP_READDIR, Size: 17, Number: 780
< 2013-09-12 13:00:49.510 Type: SSH_FXP_NAME, Size: 395, Number: 780
> 2013-09-12 13:00:49.510 Type: SSH_FXP_READDIR, Size: 17, Number: 1036
< 2013-09-12 13:00:49.510 Type: SSH_FXP_STATUS, Size: 33, Number: 1036
< 2013-09-12 13:00:49.510 Status code: 1
> 2013-09-12 13:00:49.510 Type: SSH_FXP_CLOSE, Size: 17, Number: 1284
. 2013-09-12 13:00:49.510 .;D;0;2013-09-12T01:51:25.000Z;"root" [0];"root" [0];rwx------;2
. 2013-09-12 13:00:49.510 ..;D;0;2013-09-12T01:51:25.000Z;"root" [0];"root" [0];rwx------;0
. 2013-09-12 13:00:49.510 FolderName;D;0;2013-09-12T01:50:57.000Z;"root" [0];"root" [0];rwx------;0
< 2013-09-12 13:00:49.510 Script: Drwx------ 0 root root 0 Sep 12 11:51:25 2013 .
< 2013-09-12 13:00:49.510 Script: Drwx------ 0 root root 0 Sep 12 11:51:25 2013 ..
< 2013-09-12 13:00:49.510 Script: Drwx------ 0 root root 0 Sep 12 11:50:57 2013 FolderName
> 2013-09-12 13:01:11.246 Script: put C:\Test\testfile.txt /FolderName/testfile.txt
. 2013-09-12 13:01:11.246 Copying 1 files/directories to remote directory "/FolderName/"
. 2013-09-12 13:01:11.246 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask: testfile.txt
. 2013-09-12 13:01:11.246 TM: B; ClAr: No; CPS: 0; InclM:
. 2013-09-12 13:01:11.246 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2013-09-12 13:01:11.246 File: "C:\Test\testfile.txt"
. 2013-09-12 13:01:11.246 Copying "C:\Test\testfile.txt" to remote directory started.
. 2013-09-12 13:01:11.246 Binary transfer mode selected.
. 2013-09-12 13:01:11.246 Opening remote file.
> 2013-09-12 13:01:11.246 Type: SSH_FXP_OPEN, Size: 58, Number: 1539
< 2013-09-12 13:01:11.246 Type: SSH_FXP_STATUS, Size: 21, Number: 1284
. 2013-09-12 13:01:11.246 Discarding reserved response
< 2013-09-12 13:01:11.262 Type: SSH_FXP_STATUS, Size: 34, Number: 1539
< 2013-09-12 13:01:11.262 Status code: 2, Message: 1539, Server: No such file., Language:
. 2013-09-12 13:01:11.262 Cannot create new file "/FolderName/testfile.txt", checking if it exists already
> 2013-09-12 13:01:11.262 Type: SSH_FXP_LSTAT, Size: 41, Number: 1799
< 2013-09-12 13:01:11.262 Type: SSH_FXP_STATUS, Size: 34, Number: 1799
< 2013-09-12 13:01:11.262 Status code: 2, Message: 1799, Server: No such file., Language:
* 2013-09-12 13:01:11.262 (ETerminal) No such file or directory.
* 2013-09-12 13:01:11.262 Error code: 2
* 2013-09-12 13:01:11.262 Error message from server: No such file.
* 2013-09-12 13:01:11.262 Request code: 3
. 2013-09-12 13:01:11.262 Asking user:
. 2013-09-12 13:01:11.262 Cannot create remote file '/FolderName/testfile.txt'. ("No such file or directory.
. 2013-09-12 13:01:11.262 Error code: 2
. 2013-09-12 13:01:11.262 Error message from server: No such file.
. 2013-09-12 13:01:11.262 Request code: 3")
< 2013-09-12 13:01:11.262 Script: Cannot create remote file '/FolderName/testfile.txt'.
< 2013-09-12 13:01:11.262 Script: No such file or directory.
< 2013-09-12 13:01:11.262 Error code: 2
< 2013-09-12 13:01:11.262 Error message from server: No such file.
< 2013-09-12 13:01:11.262 Request code: 3
* 2013-09-12 13:01:13.696 (EScpSkipFile) Cannot create remote file '/FolderName/testfile.txt'.
* 2013-09-12 13:01:13.696 No such file or directory.
* 2013-09-12 13:01:13.696 Error code: 2
* 2013-09-12 13:01:13.696 Error message from server: No such file.
* 2013-09-12 13:01:13.696 Request code: 3
. 2013-09-12 13:01:13.696 Script: Failed
> 2013-09-12 13:01:16.145 Script: exit
. 2013-09-12 13:01:16.145 Script: Exit code: 1
. 2013-09-12 13:01:16.145 Closing connection.
. 2013-09-12 13:01:16.145 Sending special code: 12
. 2013-09-12 13:01:16.145 Sent EOF message

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,468
Location:
Prague, Czechia

RavenTara wrote:

I believe I'm having a similar issue:

winscp> put C:\Test\testfile.txt /FolderName/*.*
C:\Test\testfile.txt | 0 KiB | 0.0 KiB/s | binary | 0%
Cannot create remote file '/FolderName/testfile.txt'.
No such file or directory.
Error code: 2
Error message from server: No such file.
Request code: 3
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort
And I'm having the same response: Does /FolderName/ exist?

Reply with quote

Advertisement

Raventara
Guest

If I use something like FileZilla and create an empty file in the same location with the same name it works. But while it's working it claims the file is 0kb.

I'm running on Windows 7 if that helps. I don't know anything about the ftp server except that it's on our local network, and I'm using the network name to connect, not the IP.

Cheers.

Reply with quote

Guest

martin wrote:

Any chance that the server ran out of space?

Ahh figured it out. I found out the server is running tightFTP which means you must run with -rawsettings SFTPMaxVersion=3

When this is done on the open command everything works.

Thanks for the help.

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Anonymous wrote:

Ahh figured it out. I found out the server is running tightFTP which means you must run with -rawsettings SFTPMaxVersion=3
How did you realized that?

Reply with quote

Guest

martin wrote:

Anonymous wrote:

Ahh figured it out. I found out the server is running tightFTP which means you must run with -rawsettings SFTPMaxVersion=3
How did you realized that?

According to our IT guy it's a known (to a Google Search at least) incompatibility between the two.

Reply with quote

Advertisement

You can post new topics in this forum