Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

ftp woes

 [1/12] from: maximo::meteorstudios::com at: 4-Aug-2003 18:45


has anyone had any problem using make-dir on ftp paths? on a web server, If I run: make-dir ftp://user:[pass--website]/pathname/ in a script, it puts it in the root level of my user account. If I run THE EXACT same command directly on the rebol console it places it in the web folder. Maybe it has something to do with the server itself, but since the same command reacts differently in a script or on the console, I thought I'd ask here first. I'm using view (last release version) -max ----------- meteor Studios, T.D. ----------- Never Argue with an idiot. They will bring you down to their level and beat you with experience

 [2/12] from: antonr:iinet:au at: 5-Aug-2003 14:13


I've had the experience where I can't create a directory anton/rebol/shell/ in my user directory. It already exists, but it seems to be a link to isp-root-dir/shell/ and is full of executable files. I suppose it's for server side scripting. I'm not sure this is your problem but it shows that ftp servers can be set up to do weird things. Anton.

 [3/12] from: roland:hadinger:arcor at: 5-Aug-2003 18:09


Hi Maxim,
> has anyone had any problem using make-dir on ftp paths?
Yes. Don't use make-dir in this case (changed root environment?) Use: close open/new ftp://user:[pass--domain--tld]/path/ instead.

 [4/12] from: maximo:meteorstudios at: 5-Aug-2003 12:15


Hi Roland,
> > has anyone had any problem using make-dir on ftp paths? > > Yes. > > Don't use make-dir in this case (changed root environment?) > > Use: > > close open/new ftp://user:[pass--domain--tld]/path/ >
thank you very much I'll try it as soon as possible! -MAx

 [5/12] from: SunandaDH:aol at: 5-Aug-2003 12:36


Maxim: has anyone had any problem using make-dir on ftp paths? It works for me, except I want to sometimes make a path /aa/bb/cc/ where /aa/ or /aa/bb/ doesn't yet exist. Here's a function I use for ftp make-path. (It also works for non-ftp, provided make-destination-path returns a local path) ;; ========================== create-folder: func [folder-wanted /local dest path ] [ dest: make-destination-path folder-wanted ;; make-destination-path (not included in this email) ;; returns the fully qualified path, including the user-id and password if exists? dest [return true] path: copy "/" foreach bit parse dest "/" [ if not bit = "" [append path join bit "/" error? try [make-dir to-file path] ] ] return true ] Sunanda.

 [6/12] from: maximo:meteorstudios at: 5-Aug-2003 12:57


Hi sunanda
> has anyone had any problem using make-dir on ftp paths? > > It works for me, except I want to sometimes make a path > /aa/bb/cc/ where /aa/ > or /aa/bb/ doesn't yet exist.
doesn't make-dir/deep work for ftp paths? I haven't tried though... -MAx

 [7/12] from: SunandaDH:aol at: 6-Aug-2003 0:51


Maxim:
> doesn't make-dir/deep work for ftp paths? > I haven't tried though...
I don't know -- no reason it shouldn't -- I haven't tried either. After I'd tried a simple make-path ftp://..../aa/bb/cc/ and it failed, I sat down and wrote the function I posted. What I'd forgotten to do was RTFH (Read The Function Help) so I was ignorant of the /deep refinement. REBOL underestimated once again! Sunanda.

 [8/12] from: maximo:meteorstudios at: 6-Aug-2003 9:56


takl about it, I RTFM two days ago and was blown off by all the new stuff I've been missing out on since about a year... I just noticed that half (or more) of the functions in my utils library are now built-in core 2.5.6 check out my next post ;-) -max ----------- meteor Studios, T.D. ----------- Never Argue with an idiot. They will bring you down to their level and beat you with experience

 [9/12] from: amicom:sonic at: 22-Oct-2003 2:04


Hello! I am trying to write a large number of large files to an FTP server using Rebol. The first dozen or two will go fine, but after that I get the following error when trying to open the FTP port: make object! [ code: 501 type: 'access id: 'not-open arg1: "Port^@" arg2: "" arg3: none near: [open/binary/new/write/direct dstfile] where: 'get-cur-dir ] dstfile looks something like this: ftp://user:[pass--ftp--host--net]/test/sitebuilder.r.old If the file does not already exist, open/new should create a new file. The odd thing here is that it works for the first dozen or two. I also tried running the same script on my home network to another computer running an FTP server, but got the same results, although even quicker. I've tried setting system/schemes/ftp/passive to true, false and none with no luck. Has anyone else seen this problem? If so, do you know of a solution? Thanks! -Bo

 [10/12] from: nitsch-lists:netcologne at: 22-Oct-2003 15:19


Hi Bo, Am Mittwoch, 22. Oktober 2003 11:04 schrieb Bohdan or Rosemary Lechnowsky:
> Hello! > I am trying to write a large number of large files to an FTP server using
<<quoted lines omitted: 19>>
> no luck. > Has anyone else seen this problem? If so, do you know of a solution?
Not seen the problem. but a thought: there is system/schemes/ftp/cache-size . which is the number of parallel connections AFAIK. rebol caches open ftp-connections for speed. if one ftp-action has a confusing result, the next action handles the rest of the reply as next reply. so if you clear the cache (looking for /cache-size in the source) maybe that helps. Another thought: ftp-servers may have a traffic-limit per session? you can only upload so much per login? in which case cache-clearing -> connection-closing might help too. but only guessing, hope the experts jump in :)
> Thanks! > > -Bo
-Volker

 [11/12] from: antonr:iinet:au at: 22-Oct-2003 23:23


I am afraid I don't have an answer, just more questions: 1. Can you make a test to see how many files really are written successfully before a failure. Is it constant? 2. What happens when you catch the error, attempt [close port] and retry the file ? Anton.

 [12/12] from: rotenca:telvia:it at: 22-Oct-2003 17:08


I have not a real solution, but i think that there are one or more bugs in the open function of the FTP handler. The first suspect code is this: repeat x length? connections [ conn: system/words/pick connections x if all [conn conn/host = temp conn/user = port/user not error? catch [get-cur-dir conn]] it should be: repeat x length? connections [ conn: system/words/pick connections x if all [conn conn/host = temp conn/user = port/user not error? try [get-cur-dir conn]] the simple catch is not enough in this case. But i think that this is not the only point of the FTP handler where this happens and i am not sure if this point is the point which caused your error. The other points are: [not proxy not passive error? catch [listen-port: get-port port]] and either error? catch [net-utils/confirm port/locals/cmd-port active-check] I think that all must be checked to see if the catch is enough and if try is a valid substitute (it could mask some errors which should instead be reported back to the user). --- Ciao Romano

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted