Topic "SFTP 'Renaming bug'"

Author Message
OpenFutura
[View user's profile]

Joined: 2003-11-07
Posts: 2
Location: Vigo - Galicia - Spain
Hi there Martin, I'm Pablo:

Let me expose the scenario...
I have one lil' server running OpenSSH_3.6.1p2 Debian 1:3.6.1p2-9, SSH protocols 1.5/2.0, OpenSSL 0x0090703f connected to a Windoze 2000 server using SaMBa Version 3.0.0-Debian. OK? Lets go...

When using SFTP to remotely upload a file in a smbmounted path it fails after e-v-e-r-y file complaining about "Permission denied" when renaming the transfered file from whatever.txt.filepart to whatever.txt.
So, to isolate the problem, i tried renaming an already transferred file. I am root, the smbshare is mounted by root, and the files' permissions are 644. No success. If I try a folder instead then it'll work.

SCP itself works perfectly for both folders and files.

Clues?

btw... i've just sent you an updated ini.

Thanks again, man.
_________________
Internet : Seguridad : Redes
http://www.openfutura.com/
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Do I understand it right that you cannot rename any file with SFTP? What SFTP version does the server support? You can see the version on status bar, i.e. SFTP (v3).

As temporary workaround to allow uploads, switch off resume support on Transfer tab of Preferences dialog.
_________________
Martin Prikryl
OpenFutura
[View user's profile]

Joined: 2003-11-07
Posts: 2
Location: Vigo - Galicia - Spain
SFTP is version 3
And i can rename using SFTP, but not within smbmounts paths boundaries. SCP is working great with smbmounted paths, though.
_________________
Internet : Seguridad : Redes
http://www.openfutura.com/
trymate

Guest


hi there,

im currently experiencing this problem with the uploading of files and the .filepart renaming problem.

i use winscp 3.7.6 build 306 with some suse linux 9.0 (x86) with:
SSH-2, OpenSSH_3.7.1p2, aes, compression yes, SFTP (v3)


i can upload, resume and rename just fine for example in the local linux paths like /home/username and so forth,

but as soon as i upload to the samba share /mnt/g/ then it fails to rename the .filepart file right after it finished the upload.

is there any real solution to this problem?

file permissions on the samba share are set for everybody, all rights, read write execute and so forth, no problem there.

i can also delete files on the samba share with winscp, but i cant rename at all with winscp on the samba share.

everything else works just fine (resume on local linux paths, upload, download, delete,....)

thanks for any hints how to resolve this problem.
trymate

Guest


here are some loglines:

Code:
Listing directory "/mnt/g/TEMP".
Type: SSH_FXP_OPENDIR, Size: 20, Number: 46859
Type: SSH_FXP_HANDLE, Size: 13, Number: 46859
Type: SSH_FXP_READDIR, Size: 13, Number: 47116
Type: SSH_FXP_NAME, Size: 843, Number: 47116
Type: SSH_FXP_READDIR, Size: 13, Number: 47372
Type: SSH_FXP_STATUS, Size: 28, Number: 47372
Status/error code: 1
Type: SSH_FXP_CLOSE, Size: 13, Number: 47620
Detected incoming data while idle
Copying 1 files/directories to remote directory "/mnt/g/TEMP/"
  PrTime: No; PrRO: No; Rght: rw-r--r--; PrR: No; FnCs: N; RIC: 01; Resume: S (102400); CalcS: Yes; Mask: *.*
  TM: B; ClAr: No; ExclM(No):
  AscM: *.*htm*; *.txt; *.php*; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex
File: "X:\Documents and Settings\user\My Documents\blubb.blabb.pdf"
Copying "X:\Documents and Settings\user\My Documents\blubb.blabb.pdf" to remote directory started.
Binary transfer mode selected.
Checking existence of file.
Type: SSH_FXP_LSTAT, Size: 50, Number: 47879
Type: SSH_FXP_STATUS, Size: 24, Number: 47620
Discarding reserved response
Type: SSH_FXP_STATUS, Size: 29, Number: 47879
Status/error code: 2
Checking existence of partially transfered file.
Type: SSH_FXP_LSTAT, Size: 59, Number: 48135
Type: SSH_FXP_STATUS, Size: 29, Number: 48135
Status/error code: 2
Opening remote file.
Type: SSH_FXP_OPEN, Size: 75, Number: 48387
Type: SSH_FXP_HANDLE, Size: 13, Number: 48387
Type: SSH_FXP_WRITE, Size: 4121, Number: 48902
Detected incoming data while idle
Detected incoming data while idle
Detected incoming data while idle
Detected incoming data while idle
Detected incoming data while idle
Detected incoming data while idle
Detected incoming data while idle
Detected incoming data while idle
Detected incoming data while idle
Detected incoming data while idle
Detected incoming data while idle
Detected incoming data while idle
Detected incoming data while idle
Detected incoming data while idle
Detected incoming data while idle
Detected incoming data while idle
Detected incoming data while idle
Detected incoming data while idle
39 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
Type: SSH_FXP_CLOSE, Size: 13, Number: 54276
Type: SSH_FXP_STATUS, Size: 24, Number: 53766
Type: SSH_FXP_STATUS, Size: 24, Number: 54022
Type: SSH_FXP_STATUS, Size: 24, Number: 54276
Status/error code: 0
Type: SSH_FXP_RENAME, Size: 104, Number: 54546
Type: SSH_FXP_STATUS, Size: 34, Number: 54546
Status/error code: 3, Message: 54546, Server: Permission denied, Language: 
(ETerminal) Permission denied.
Error code: 3
Error message from server: Permission denied
Request code: 18
Asking user:
Transfer was succesfully finished, but temporary transfer file 'blubb.blabb.pdf.filepart' could not be renamed to target file name 'blubb.blabb.pdf'. If the problem persists, you may try to turn off transfer resume support. ("Permission denied.
Error code: 3
Error message from server: Permission denied
Request code: 18")
(EScpSkipFile) Transfer was succesfully finished, but temporary transfer file 'blubb.blabb.pdf.filepart' could not be renamed to target file name 'blubb.blabb.pdf'. If the problem persists, you may try to turn off transfer resume support.
Permission denied.
Error code: 3
Error message from server: Permission denied
Request code: 18
Listing directory "/mnt/g/TEMP".
Type: SSH_FXP_OPENDIR, Size: 20, Number: 54795
Type: SSH_FXP_HANDLE, Size: 13, Number: 54795
Type: SSH_FXP_READDIR, Size: 13, Number: 55052
Type: SSH_FXP_NAME, Size: 1015, Number: 55052
Type: SSH_FXP_READDIR, Size: 13, Number: 55308
Type: SSH_FXP_STATUS, Size: 28, Number: 55308
Status/error code: 1
Type: SSH_FXP_CLOSE, Size: 13, Number: 55556
Detected incoming data while idle
Sending null packet to keep session alive.
Sending special code: 15
Sending null packet to keep session alive.
Sending special code: 15
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
trymate wrote:
i can also delete files on the samba share with winscp, but i cant rename at all with winscp on the samba share.

Can you do that with any other SFTP client?
_________________
Martin Prikryl
trymate

Guest


prikryl wrote:
trymate wrote:
i can also delete files on the samba share with winscp, but i cant rename at all with winscp on the samba share.

Can you do that with any other SFTP client?


what other sftp clients are there out there for win32?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
trymate wrote:
what other sftp clients are there out there for win32?

PSFTP, Filezila, ...
_________________
Martin Prikryl
broekpak

Guest


ive tried filezilla i got the same error,
i can rename dirs but no files

i thought of maybe just disablein the .filepart renamin when u transfer a file would be a sollution (at least for me)
broekpak

Guest


but is that possible? disablein the .filepart renamin?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
broekpak wrote:
but is that possible? disablein the .filepart renamin?

You can disable transfer resuming support.
_________________
Martin Prikryl
Alain Cote

Guest


I've had this problem when copying .iso local files to a VMware ESX server.

The connexion was configured to use SFTP! I've changed it to SCP instead and now, the files are copied with no errors.
davidenko

Guest


I've had this problem when copying .iso local files to a VMware ESX server.

In our situation the root user didn't have the proper rights in that directory. Therefore the copy didn't succeed. Rename or deleting also didn't work from the WISCP GUI. So it wasn't a winscp problem, but more an ESX rights configuration.
richardnlees

Guest


Hi Martin,
I've seen the solution for running WinSCP.exe, but what about the solution for WinSCP.com ? Is there a way of turning off resume here too ? Like an option or a switch ? I can't find anything on the forums.
I'm simply running a script via WinSCP.com, transfer works perfectly but error is the usual :

Transfer was successfully finished, but temprary transfer file 'x.filepart' could not be renamed to target filename 'x'.If the problem persists you may try to turn off transfer resume support.
Permission Denied.
Error code: 3
Error message from server: Permission denied!
Request code: 18

etc., etc.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
richardnlees wrote:
I've seen the solution for running WinSCP.exe, but what about the solution for WinSCP.com ? Is there a way of turning off resume here too ? Like an option or a switch ? I can't find anything on the forums.

Please read FAQ. If that does not help, come back.
_________________
Martin Prikryl
richardnlees

Guest


Hi Martin,
Really sorry, but I need more help. Seems I can create a INI file, suggest the FAQ's but I have no idea what needs to be in the INI file (I've NEVER done this before). I am a complete 'Virgin' when it comes to this stuff.
It's obviously not critical, as I am moving the file on from the SFTP server to another server, and I rename the file being transferred, but I'd really like not to get the error.
Please can you help me a little more.
Many thanks, and sorry to be a pain.
Best Regards,
Richard
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
richardnlees wrote:
Really sorry, but I need more help. Seems I can create a INI file, suggest the FAQ's but I have no idea what needs to be in the INI file (I've NEVER done this before). I am a complete 'Virgin' when it comes to this stuff.

Just turn off resume support in GUI and switch to using INI file. The setting will be transferred to the INI file in the process.
_________________
Martin Prikryl
richardnlees

Guest


Hi again Martin,
I went into the GUI, Disabled the Resume, and saved the settings. I then looked at the WinSCP.ini file to see if anything had changed. Nothing had. I then manually changed the 1st of the fillowing lines:
ResumeSupport=0
ResumeThreshold=102400
I included this WinSCP.ini file using the /ini=WinSCP.ini and there was no change. What am I doing wrong ?
Best Regards,
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
It should be:
ResumeSupport=2
_________________
Martin Prikryl
richardnlees

Guest


Hi Martin,
As ever, you are a genius (was never in dispute, but...). Worked perfectly.
Many thanks
Best Regards,
Rich
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Read more about the error:
https://winscp.net/eng/docs/message_transfer_finished_could_not_rename
_________________
Martin Prikryl
dweia
[View user's profile]

Joined: 2012-10-22
Posts: 1
Thanks for the helpful tip, I am now able to use "filepart" with the SMB-shares. One more tweak I had to apply: under "Settings->Session" I chose SCP and under "Settings->Environment->SCP/Shell" I had to set Shell to "/bin/ksh", because with setting "Standard", WinSCP would complain about an invalid line in the file-listing because "ls -al" generates a summary-line that shows the total (k)bytes in the current folder.
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