Topic "Cannot Create Remote File via SFTP upload"

Author Message
jabfrispe

Guest


All, I'm hoping someone might be able to tell me what's going on here.

I am attempting to do a simple sFTP transfer from a Wintel machine to an AIX server. I believe I have all of my rights and groups and things set correctly.

In fact, as the user (sintedi), when logged on to AIX, I am able to create files in this directory (e.g. "touch file" is OK). I also tested by temporarily enabling regular ftp and I was able to do the upload. The only way this doesn't seem to be working is via WinSCP/sFTP connection

When I use the GUI or Command line for WinSCP, I get "cannot create remote file", "permission denied", "error code 3"

Below is a snip of the log. I think the problem is in code below, but I don't know where it is getting that particular set of rights. (AIX output shown below snip).

. 2014-04-09 12:13:14.523 Changing directory to "in".
. 2014-04-09 12:13:14.523 Getting real path for '/sap_imports/p01/sintel/in'
> 2014-04-09 12:13:14.523 Type: SSH_FXP_REALPATH, Size: 35, Number: 64784
< 2014-04-09 12:13:14.529 Type: SSH_FXP_NAME, Size: 73, Number: 64784
. 2014-04-09 12:13:14.529 Real path is '/sap_imports/p01/sintel/in'
. 2014-04-09 12:13:14.529 Trying to open directory "/sap_imports/p01/sintel/in".
> 2014-04-09 12:13:14.529 Type: SSH_FXP_LSTAT, Size: 35, Number: 65031
< 2014-04-09 12:13:14.530 Type: SSH_FXP_ATTRS, Size: 37, Number: 65031
. 2014-04-09 12:13:14.530 Getting current directory name.
. 2014-04-09 12:13:14.531 Listing directory "/sap_imports/p01/sintel/in".
> 2014-04-09 12:13:14.531 Type: SSH_FXP_OPENDIR, Size: 35, Number: 65291
< 2014-04-09 12:13:14.532 Type: SSH_FXP_HANDLE, Size: 13, Number: 65291
> 2014-04-09 12:13:14.532 Type: SSH_FXP_READDIR, Size: 13, Number: 65548
< 2014-04-09 12:13:14.534 Type: SSH_FXP_NAME, Size: 207, Number: 65548
> 2014-04-09 12:13:14.534 Type: SSH_FXP_READDIR, Size: 13, Number: 65804
< 2014-04-09 12:13:14.535 Type: SSH_FXP_STATUS, Size: 28, Number: 65804
< 2014-04-09 12:13:14.535 Status code: 1
> 2014-04-09 12:13:14.535 Type: SSH_FXP_CLOSE, Size: 13, Number: 66052
. 2014-04-09 12:13:14.536 ..;d;4096;2014-04-09T16:12:02.000Z;"root" [0];"sapsys" [203];rwxr-xr-x;0
Code:
. 2014-04-09 12:13:17.142 Copying 1 files/directories to remote directory "/sap_imports/p01/sintel/in/"
. 2014-04-09 12:13:17.142   PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: Yes; Mask: *.*

. 2014-04-09 12:13:17.142 TM: B; ClAr: No; CPS: 0; InclM:
. 2014-04-09 12:13:17.142 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2014-04-09 12:13:17.142 File: "C:\test.txt"
. 2014-04-09 12:13:17.143 Copying "C:\test.txt" to remote directory started.
. 2014-04-09 12:13:17.143 Binary transfer mode selected.
. 2014-04-09 12:13:17.144 Opening remote file.
> 2014-04-09 12:13:17.144 Type: SSH_FXP_OPEN, Size: 60, Number: 66307
< 2014-04-09 12:13:17.144 Type: SSH_FXP_STATUS, Size: 24, Number: 66052
. 2014-04-09 12:13:17.144 Discarding reserved response
< 2014-04-09 12:13:17.147 Type: SSH_FXP_STATUS, Size: 34, Number: 66307
< 2014-04-09 12:13:17.147 Status code: 3, Message: 66307, Server: Permission denied, Language:
. 2014-04-09 12:13:17.147 Cannot create new file "/sap_imports/p01/sintel/in/test.txt", checking if it exists already
> 2014-04-09 12:13:17.147 Type: SSH_FXP_LSTAT, Size: 44, Number: 66567
< 2014-04-09 12:13:17.157 Type: SSH_FXP_STATUS, Size: 29, Number: 66567
< 2014-04-09 12:13:17.157 Status code: 2, Message: 66567, Server: No such file, Language:
* 2014-04-09 12:13:17.157 (ETerminal) Permission denied.
* 2014-04-09 12:13:17.157 Error code: 3
* 2014-04-09 12:13:17.157 Error message from server: Permission denied
* 2014-04-09 12:13:17.157 Request code: 3
. 2014-04-09 12:13:17.157 Asking user:
. 2014-04-09 12:13:17.157 Cannot create remote file '/sap_imports/p01/sintel/in/test.txt'. ("Permission denied.
. 2014-04-09 12:13:17.157 Error code: 3
. 2014-04-09 12:13:17.157 Error message from server: Permission denied
. 2014-04-09 12:13:17.157 Request code: 3")
* 2014-04-09 12:13:18.315 (EScpSkipFile) Cannot create remote file '/sap_imports/p01/sintel/in/test.txt'.
* 2014-04-09 12:13:18.315 Permission denied.
* 2014-04-09 12:13:18.316 Error code: 3
* 2014-04-09 12:13:18.316 Error message from server: Permission denied
* 2014-04-09 12:13:18.316 Request code: 3
. 2014-04-09 12:13:18.316 Listing directory "/sap_imports/p01/sintel/in".
> 2014-04-09 12:13:18.316 Type: SSH_FXP_OPENDIR, Size: 35, Number: 66827
< 2014-04-09 12:13:18.318 Type: SSH_FXP_HANDLE, Size: 13, Number: 66827
> 2014-04-09 12:13:18.318 Type: SSH_FXP_READDIR, Size: 13, Number: 67084
< 2014-04-09 12:13:18.321 Type: SSH_FXP_NAME, Size: 207, Number: 67084
> 2014-04-09 12:13:18.321 Type: SSH_FXP_READDIR, Size: 13, Number: 67340
< 2014-04-09 12:13:18.323 Type: SSH_FXP_STATUS, Size: 28, Number: 67340
< 2014-04-09 12:13:18.323 Status code: 1
> 2014-04-09 12:13:18.323 Type: SSH_FXP_CLOSE, Size: 13, Number: 67588
. 2014-04-09 12:13:18.323 ..;d;4096;2014-04-09T16:12:02.000Z;"root" [0];"sapsys" [203];rwxr-xr-x;0[/code]

Code:

drwxr-xr-x    2 root     system         4096 Apr 09 16:19 in
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Can you do touch /sap_imports/p01/sintel/in/test.txt?
Did you try other SFTP client?
_________________
Martin Prikryl
jabfrispe

Guest


Yes, I was able to run both the following as the user:

Code:
touch /sap_imports/p01/sintel/in/test.txt

Code:
rm /sap_imports/p01/sintel/in/test.txt


I just tried with "BitKinex" and "CoreFTP". Both worked fine.[/code]
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
jabfrispe wrote:
I just tried with "BitKinex" and "CoreFTP". Both worked fine.

Please attach their log file.
_________________
Martin Prikryl
jabfrispe

Guest


Here's the log from CoreFTP (base log):

Code:

Welcome to Core FTP, release ver 2.2, build 1778 (U) -- © 2003-2013
WinSock 2.0
Mem -- 4,062,440 KB, Virt -- 2,097,024 KB
Started on Monday April 21, 2014 at 14:57:PM
Resolving aubcp01... 
aubcp01 [22] connecting... 
SSH-2.0-OpenSSH_6.0 
client -> aes128-ctr
server -> aes128-ctr
d1:42:e8:f4:3a:c8:52:51:04:99:71:d9:8a:df:d0:65
ssh-rsa
Sending password
PWD 
Current directory is '/home/sinteledi' 
Keep alive off...
Transferred 315 bytes in 0.008 seconds 
CWD /home 
Transferred 1,278 bytes in 0.008 seconds 
CWD / 
CWD /bin 
CWD /lib 
CWD /u 
CWD /unix 
CWD / 
Transferred 3,143 bytes in 0.001 seconds 
CWD /sap_imports 
Transferred 1,077 bytes in 0.008 seconds 
CWD /sap_imports/p01/ 
Transferred 302 bytes in 0.008 seconds 
CWD /sap_imports/p01/sintel/ 
Transferred 299 bytes in 0.008 seconds 
CWD /sap_imports/p01/sintel/in/ 
Transferred 276 bytes in 0.008 seconds 
DELE IT_Staff.txt 
DELE qad_monitoring_users_password.txt 
Transferred 117 bytes in 0.008 seconds 
STOR /sap_imports/p01/sintel/in/openitems.txt 
openitems.txt - 1044 bytes transferred in 0 seconds 
Transfer time: 00:00:00 
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
That's quite useless unfortunately. It actually looks like a FTP log. Do they have more verbose logging option? Or can you attach log from BitKinex?
_________________
Martin Prikryl
jabfrispe

Guest


I set logging level to "DEBUG" in BitKinex and then did the transfer. It doesn't look much more than a standard FTP log either. If you have a specific step/logging/information that you'd like me to gather, I'm happy to help. What we have found is that WinSCP is the only software that seems to have this trouble. FileZilla, CoreFTP, and BitKinex all work.

I've attached the log.
bitkinex.txt (14.19 KB) [Download]

Description: BitKinex log

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
OK, thanks. Please attach a complete WinSCP log file.
jabfrispe

Guest


Attached.
winscp2.log (25.97 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Thanks.
Can you try the same, but disable overwrite confirmations?

Do you have an access to OpenSSH server log?
Can you share server's log showing upload using WinSCP and one of the other clients?
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