FTP delete not working via WinSCP 4.2.7 explorer interface
winscp v 4.2.7 running on windows 2003 r2 enterprise edition server with SP2 connecting to a WS_FTP Server 7.1(97000000)
I'm logging on to a FTP server (standard FTP - no encryption) and I can successfully put/get files to the server. Problems arise when I try a delete operation - I get an error dialogue box stating "error deleting file '<name of file>'" with 'deletion failed' within the detail box. I've tried connecting in both passive and active ftp and get the same result. I also get the same thing if I try it from a winscp console session (eventually I want to script it):-
winscp> option batch on
batch on
winscp> option confirm off
confirm off
winscp>
winscp> open ftp://username1:password@ftpserver
Connecting to ftpserver ...
Connected with ftpserver. Waiting for welcome message...
Connected
Starting the session...
Reading remote directory...
Session started.
Active session: [1] username1@ftpserver
winscp> cd /test/upload/HRMS_Australia
/test/upload/HRMS_Australia
winscp> ls
D--------- 0 0 ..
-rwxr-x--- 0 username System 25 Apr 21 18:14 testfile.dat
winscp> rm testfile.dat
Error deleting file 'testfile.dat'.
Deletion failed
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort
winscp>
I'm beginning to think that its because the permissions on the ls state 'username' and not 'username1' - does winscp query this??? (I wouldnt have thought so?)
What DOES work is Microsoft Windows 2003 Server native ftp client:-
C:\Documents and Settings\userid>ftp ftpserver
Connected to ftpserver.
220 ftp4.xxxxxxx.net X2 WS_FTP Server 7.1(97000000)
User (ftp.xxxxxxxxx.com:(none)): username
331 Enter password
Password:
230-User logged in
Welcome to ftp4.xxxxxxxx.net
230 User logged in
ftp> cd /test/upload/HRMS_Australia
250 Command CWD succeed
ftp> ls
200 Command PORT succeed
125 Transferring directory
testfile.dat
226 Transfer completed
ftp: 14 bytes received in 0.00Seconds 14000.00Kbytes/sec.
ftp> delete testfile.dat
250 deleted
ftp> ls
200 Command PORT succeed
125 Transferring directory
226 Transfer completed
ftp>
I've checked with the FTP server owner and they say no probs when they logon to the server with the same account and delete the same file.... (just as I do with the Windows native ftp client)
Here's a portion of the winscp log (in debug2 mode) relating to the delete operation (I've altered it slightly since the username is present which reveals the company name the account is used for)
. 2010-04-21 18:45:39.740 Cached directory change via "HRMS_Australia" to "/test/upload/HRMS_Australia".
. 2010-04-21 18:45:39.787 Getting current directory name.
. 2010-04-21 18:45:39.787 Retrieving directory listing...
> 2010-04-21 18:45:39.787 CWD /test/upload/HRMS_Australia/
< 2010-04-21 18:45:39.818 250 Command CWD succeed
> 2010-04-21 18:45:39.818 PWD
< 2010-04-21 18:45:39.834 257 "/test/upload/HRMS_Australia" is current directory
> 2010-04-21 18:45:39.834 TYPE A
< 2010-04-21 18:45:39.850 200 Transfer mode set to ASCII
> 2010-04-21 18:45:39.850 PORT 10,16,1,106,18,119
< 2010-04-21 18:45:39.865 200 Command PORT succeed
> 2010-04-21 18:45:39.865 LIST -a
< 2010-04-21 18:45:39.897 125 Transferring directory
. 2010-04-21 18:45:39.897 drwxr-x--- 2 username System 0 Apr 21 18:44 .
. 2010-04-21 18:45:39.897 drwxr-x--- 2 username System 0 Mar 01 2010 ..
. 2010-04-21 18:45:39.897 -rwxr-x--- 1 username System 25 Apr 21 18:44 testfile.dat
< 2010-04-21 18:45:39.897 226 Transfer completed
. 2010-04-21 18:45:39.897 Directory listing successful
. 2010-04-21 18:45:39.897 Got reply 1 to the command 2
. 2010-04-21 18:45:40.318 Session upkeep
. 2010-04-21 18:45:40.365 Session upkeep
. 2010-04-21 18:45:40.865 Session upkeep
. 2010-04-21 18:45:41.365 Session upkeep
. 2010-04-21 18:45:41.865 Session upkeep
. 2010-04-21 18:45:42.365 Session upkeep
. 2010-04-21 18:45:42.865 Session upkeep
. 2010-04-21 18:45:43.365 Session upkeep
. 2010-04-21 18:45:43.787 Deleting file "testfile.dat".
> 2010-04-21 18:45:43.819 DELE /test/upload/HRMS_Australia/testfile.dat
< 2010-04-21 18:45:43.834 450 Deletion failed
. 2010-04-21 18:45:43.834 Got reply 1 to the command 32
. 2010-04-21 18:45:43.850 Asking user:
. 2010-04-21 18:45:43.850 Error deleting file 'testfile.dat'. ("Deletion failed")
. 2010-04-21 18:45:43.975 Session upkeep
. 2010-04-21 18:45:44.365 Session upkeep
. 2010-04-21 18:45:44.865 Session upkeep
. 2010-04-21 18:45:45.365 Session upkeep
. 2010-04-21 18:45:45.865 Session upkeep
Any ideas?
I'm logging on to a FTP server (standard FTP - no encryption) and I can successfully put/get files to the server. Problems arise when I try a delete operation - I get an error dialogue box stating "error deleting file '<name of file>'" with 'deletion failed' within the detail box. I've tried connecting in both passive and active ftp and get the same result. I also get the same thing if I try it from a winscp console session (eventually I want to script it):-
winscp> option batch on
batch on
winscp> option confirm off
confirm off
winscp>
winscp> open ftp://username1:password@ftpserver
Connecting to ftpserver ...
Connected with ftpserver. Waiting for welcome message...
Connected
Starting the session...
Reading remote directory...
Session started.
Active session: [1] username1@ftpserver
winscp> cd /test/upload/HRMS_Australia
/test/upload/HRMS_Australia
winscp> ls
D--------- 0 0 ..
-rwxr-x--- 0 username System 25 Apr 21 18:14 testfile.dat
winscp> rm testfile.dat
Error deleting file 'testfile.dat'.
Deletion failed
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort
winscp>
I'm beginning to think that its because the permissions on the ls state 'username' and not 'username1' - does winscp query this??? (I wouldnt have thought so?)
What DOES work is Microsoft Windows 2003 Server native ftp client:-
C:\Documents and Settings\userid>ftp ftpserver
Connected to ftpserver.
220 ftp4.xxxxxxx.net X2 WS_FTP Server 7.1(97000000)
User (ftp.xxxxxxxxx.com:(none)): username
331 Enter password
Password:
230-User logged in
Welcome to ftp4.xxxxxxxx.net
230 User logged in
ftp> cd /test/upload/HRMS_Australia
250 Command CWD succeed
ftp> ls
200 Command PORT succeed
125 Transferring directory
testfile.dat
226 Transfer completed
ftp: 14 bytes received in 0.00Seconds 14000.00Kbytes/sec.
ftp> delete testfile.dat
250 deleted
ftp> ls
200 Command PORT succeed
125 Transferring directory
226 Transfer completed
ftp>
I've checked with the FTP server owner and they say no probs when they logon to the server with the same account and delete the same file.... (just as I do with the Windows native ftp client)
Here's a portion of the winscp log (in debug2 mode) relating to the delete operation (I've altered it slightly since the username is present which reveals the company name the account is used for)
. 2010-04-21 18:45:39.740 Cached directory change via "HRMS_Australia" to "/test/upload/HRMS_Australia".
. 2010-04-21 18:45:39.787 Getting current directory name.
. 2010-04-21 18:45:39.787 Retrieving directory listing...
> 2010-04-21 18:45:39.787 CWD /test/upload/HRMS_Australia/
< 2010-04-21 18:45:39.818 250 Command CWD succeed
> 2010-04-21 18:45:39.818 PWD
< 2010-04-21 18:45:39.834 257 "/test/upload/HRMS_Australia" is current directory
> 2010-04-21 18:45:39.834 TYPE A
< 2010-04-21 18:45:39.850 200 Transfer mode set to ASCII
> 2010-04-21 18:45:39.850 PORT 10,16,1,106,18,119
< 2010-04-21 18:45:39.865 200 Command PORT succeed
> 2010-04-21 18:45:39.865 LIST -a
< 2010-04-21 18:45:39.897 125 Transferring directory
. 2010-04-21 18:45:39.897 drwxr-x--- 2 username System 0 Apr 21 18:44 .
. 2010-04-21 18:45:39.897 drwxr-x--- 2 username System 0 Mar 01 2010 ..
. 2010-04-21 18:45:39.897 -rwxr-x--- 1 username System 25 Apr 21 18:44 testfile.dat
< 2010-04-21 18:45:39.897 226 Transfer completed
. 2010-04-21 18:45:39.897 Directory listing successful
. 2010-04-21 18:45:39.897 Got reply 1 to the command 2
. 2010-04-21 18:45:40.318 Session upkeep
. 2010-04-21 18:45:40.365 Session upkeep
. 2010-04-21 18:45:40.865 Session upkeep
. 2010-04-21 18:45:41.365 Session upkeep
. 2010-04-21 18:45:41.865 Session upkeep
. 2010-04-21 18:45:42.365 Session upkeep
. 2010-04-21 18:45:42.865 Session upkeep
. 2010-04-21 18:45:43.365 Session upkeep
. 2010-04-21 18:45:43.787 Deleting file "testfile.dat".
> 2010-04-21 18:45:43.819 DELE /test/upload/HRMS_Australia/testfile.dat
< 2010-04-21 18:45:43.834 450 Deletion failed
. 2010-04-21 18:45:43.834 Got reply 1 to the command 32
. 2010-04-21 18:45:43.850 Asking user:
. 2010-04-21 18:45:43.850 Error deleting file 'testfile.dat'. ("Deletion failed")
. 2010-04-21 18:45:43.975 Session upkeep
. 2010-04-21 18:45:44.365 Session upkeep
. 2010-04-21 18:45:44.865 Session upkeep
. 2010-04-21 18:45:45.365 Session upkeep
. 2010-04-21 18:45:45.865 Session upkeep
Any ideas?