Koozali.org: home of the SME Server

Error connecting to the FTP site

Offline banana_boat30

  • *
  • 11
  • +0/-0
Error connecting to the FTP site
« on: December 18, 2009, 02:32:36 AM »
Hi Folks,

I am having trouble to figure out how to modify the squid config, so it can access FTP server from the client machine.
Currently, we're running SME Server 7.4 behind a firewall, SME server in server-mode only. Port 21 is open for outgoing traffic. However, we receive this error below upon typing the FTP details from the web browser:

An FTP protocol error occurred while trying to retrieve the URL: ftp://xxx.xxx.xxx.xxx/blabla

Squid sent the following FTP command:

    Connect to server

and then received this reply

I have checked using other internet connection and the FTP server is actually up and running, only happens to user who is behind this SME server.

Do you have any suggestion?

Offline mmccarn

  • *
  • 2,657
  • +10/-0
Re: Error connecting to the FTP site
« Reply #1 on: December 18, 2009, 04:53:22 PM »
Try changing the FTP "mode" on one of your workstations - if you're currently set to use "active", change to "passive"; if you're using "passive", change to "active".

Read more here: http://www.ncftp.com/ncftpd/doc/misc/ftp_and_firewalls.html#TwoTypes

Offline banana_boat30

  • *
  • 11
  • +0/-0
Re: Error connecting to the FTP site
« Reply #2 on: December 21, 2009, 01:43:02 AM »
Hi mmccarn,

I have tried using the FTP client and tried changing the active and passive mode but no luck.

I had browse around and found something that we had to add in the squid.conf:

acl ftp proto FTP
http_access allow ftp

Do you think this is necessary?

Thanks for trying to help.

Offline mmccarn

  • *
  • 2,657
  • +10/-0
Re: Error connecting to the FTP site
« Reply #3 on: December 21, 2009, 01:03:27 PM »
I've never needed to do anything with squid on a SME to get outbound FTP connections to work; have you done something unusual that gets squid involved in your FTP connections?

I found this post discussing using squid to proxy ftp connections, and mentioning that you may need to add your username to the FTP URL (to keep Squid from trying a different/wrong user name on its own): http://nixcraft.com/linux-software/384-ftp-through-squid.html