[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: FTP_delete



Dear Scott.

I am aware of the 500 is coming from the server, and sure the 'dele' in
FTPAPI
is the correct command for deleting files on server side.

Now your suggested test with the i5 Ftp client, here is the log
	Windows_NT Windows Server 2003 Standard Edition  (Build 3790) Service Pack
1
	debug 1
	DEBUG is on. DEBUG value is 1.
	cd download
	>>> CWD download
	250 CWD command successful.
	cd schedule
	>>> CWD schedule
	250 CWD command successful.
	del sched_20080314140242.txt
	>>> DELE sched_20080314140242.txt
	200 sched_20080314140242.txt deleted.
	dele sched_20080314140345.txt
	>>> DELE sched_20080314140345.txt
	200 sched_20080314140345.txt deleted.

I deleted 2 files with 'del' and 'dele'.
On the FTP server side the files are actually deleted.

I did the same experiment from a dos command line with positive results.
Using explorer accessing the ftp server works too, or just use i.e. CuteFtp
client.

I even tried to replace the access to the Windows_NT Windows Server 2003
with
my own FTP server (WAR FTP DAEMON http://www.warftp.org/ works very nice) so
the RPG program with FTPAPI used this server instead. It works with the
'dele'.
This could indicate some 'problem' on the Windows FTP server.

In the RPG program there is some processing between the ftp_get(ftp:
Files(X))
and ftp_delete(ftp: Files(X)), but I just tried doing this in debug for
waiting
another 30 secs. before executing the ftp_delete(ftp: Files(X)). Still
getting
the 500.

To me the problems seems to be somewhere 'between' FTPAPI and the FTP
server, but I
am not able to identify where 'between' is *S*.






-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Scott Klement
Sent: Tuesday, May 06, 2008 9:13 AM
To: HTTPAPI and FTPAPI Projects
Subject: Re: FTP_delete


Hello Helge,

Unless I'm very confused, sending DELE followed by the filename is the
correct FTP command to delete a file.   The message '500
sched_20080505152223.txt not delete' is not coming from FTPAPI, it's
coming from the FTP server.  Any time you see a message prefixed by a
3-digit number, it's coming from the server (FTPAPI merely receives it
and relays it to you.)

You say that this works with all other FTP clients aside from FTPAPI.
Okay, if that's the case, please go into IBM's FTP client (the 'FTP'
command in i5/OS).  Type 'debug 1' into the IBM client, and then run
your delete command.  You should see something like this:

debug 1
DEBUG is on. DEBUG value is 1.

del sched_20080505152223.txt
 >>> DELE sched_20080505152223.txt
250 DELE command successful.

The part after the >>> is what the FTP client (IBM's client in this
case) is sending to the FTP server.  Assuming that FTPAPI is doing
something wrong you should see a difference from what the IBM clientis
doing, and what FTPAPI is doing.  (from your log output, it looks like
FTPAPI is working properly, but...  if every other FTP client works, it
must be FTPAPI, right?)

Anyway, if you can tell me what's different from the IBM one and what
you see in your job log with FTPAPI, perhaps I can fix the problem!

If they are sending the same thing, then I would suspect that the
problem is in the server.  (Perhaps you're sending the FTP_Delete() too
quickly, and the server hasn't had time to close it's files yet.
Personally, I'd consider that a bug in the server.)  But, that's just a
wild guess. I don't know for sure what the problem is -- it'd be nice if
the FTP server gave us a more useful message than simply saying 'not
deleted'!!


Helge Bichel wrote:
> 	[2]  > DELE sched_20080505162233.txt
> 	     500 sched_20080505162233.txt not deleted.
> Accessing the ftp server via any ftp client allows
> deleting the file on the server, so it's not
> missing authority causing the
> 	500 sched_20080505162233.txt not deleted.

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------



-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------