# Newbie ftp problem

**URL:** <https://www.ruby-forum.com/t/newbie-ftp-problem/72762>\
**Category:** Ruby\
**Created:** [October 18, 2006, 6:31pm UTC](https://www.ruby-forum.com/t/newbie-ftp-problem/72762 "2006-10-18T18:31:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [October 18, 2006, 6:31pm UTC](https://www.ruby-forum.com/t/newbie-ftp-problem/72762/1 "2006-10-18T18:31:44Z")

</div>

I was going to try and use ruby to transfer files to an FTP site so I  
figured I would try some simple code in the irb.

ftp = Net::FTP::new(‘[my.url.com](http://my.url.com)’)  
ftp.login(‘login\_id’,‘login\_pass’,nil)  
ftp.chdir(‘data’)

all goes fine but at this point I have tried all of the following and  
get the same errors

files = ftp.list(‘data’)  
files = ftp.dir(‘data’)  
files = ftp.dir(dir = nil)  
files = ftp.nlst(‘data’)

Net::FTPPermError: 500 Invalid PORT command.

I know that there are files that should have been listed.

I have Googled the error and looked on the news group to get a solution  
and haven’t found one or was not smart enough to understand the one  
that was given.

Any help would be appreciated.

Len S.
