On Thu, Nov 29, 2001 at 05:06:10PM +0300, Alexander V. Lukyanov wrote:
> > When mirror -R wants to change permissions on uploaded files and fails
> > to do that it reconnects and tries again and again. 
> 
> Please turn on debug and send output to me.
> 
> > It would be good to have ftp:disallow-chmod or some option in mirror
> > command...
> 
> I'll add ftp:use-site-chmod setting.

I wouldn't recommend that--not for this reason alone, anyway.  Note that
this is exactly the same problem he was having with MKD--he's probably
receiving a 5xx code here, too.  (And we probably shouldn't add
"ftp:use-mkd".)

>> since lftp can distinguish between temporary and fatal error
>> conditions.
>> This is only needed for stupid ftp servers which send fatal error code
>> 5xx
>> on temporary errors.

The RFC is very ambiuous to me, here.  First, it says:
"4yz   Transient Negative Completion reply
The command was not accepted and the requested action did not take
place, but the error condition is temporary and the action may be
requested again."

Then it says:

"A rule of thumb in determining if a reply fits into the 4yz or the 5yz
(Permanent Negative) category is that replies are 4yz if the commands
can be repeated without any change in command form or in properties of
the User or Server"

These two are contradictory.  By the first sentence, these should be
5xx, since the error condition is probably not temporary (If the
directory exists, and you try to create it, it returns a 5xx--since if
you retry, it'll probably still exist.  Same logic for CHMOD's "access
denied"--it'll still be denied if retried.)  But by the second, it
should be 4xx (it failed, and will probably still fail, but you can
repeat it as much as you want.)

ProFTPD 1.2.4's interpretation:

lftp glenn@0:~> mkdir mutt
---> MKD mutt
<--- 550 mutt: File exists
mkdir: Access failed: 550 mutt: File exists

I'm not sure what the intended behavior is for this wrt. persist-retries; I
don't use that setting.  Persisting on "file exists" doesn't make much
sense, but persist-retries will persist on lots of things that don't
make much sense (even "cd" to a nonexistant path.)

Piotr, what this would end up doing is giving you persist-retries for
everything *except* CHMOD.  I'm not sure if this is really what you
want; it'd be a bit of a hack.  I think whatever fix is used for your
MKD problem should apply here, too.  Do you really need persist-retries?
There's now xfer:disk-full-fatal, if that's why you need it.

Oops.  Bug:

lftp glenn@0:~> cls vsprintf.cc
---> CWD /home/glenn/vsprintf.cc
<--- 550 /home/glenn/vsprintf.cc: Not a directory
---- Persist and retry
---> QUIT

We should never persist-retry for the "probe" CWD in GetFileInfo.cc.
(In principle, we should never retry if the error means "not a
directory"; in practice we're probably better off never persisting at
all here, since this particular special case is important--we can't have
it failing on oddly worded or multilingual servers.)

-- 
Glenn Maynard

Reply via email to