From: Harry Ohlsen Date: 2004-01-20T08:41:51+09:00 Subject: Re: Help! cannot recursive call Harry Ohlsen wrote: > Maybe I've misread the code, but shouldn't the marked line just be > "chmodDir(ftp, dir)"? Presumably, there should also be some kind of chmod() call in there, too. Ie, something like ... def chmodDir(ftp, dir) ftp.chdir(dir) puts ftp.pwd ftp.list() do |e| dir = e.split(/ +/)[8] if e=~ /^d/ ftp.chmod(dir) # <---------------- Change the subdirectory's mode chmodDir(ftp, dir)# <---------------- Recurse to handle *its* subdirectories end end end But, maybe you're just trying to get the recursion working before adding that code. What's more, I don't even know whether there *is* a Net::FTP.chmod() method :-). I'm just guessing here. H.