Page 1 of 1

FTP/DATABASE Help please

Posted: Wed Jun 11, 2014 6:44 pm
by chathura25
my friend has create a data base in somee.com. he give me user name and password and asked to upload a data from my raspberry pi. i'm not new to python and raspberry pi. but i'm so confused.
he asked me to upload data to this address. AAAgps.mssql.somee.com. it has own it passwrd and user name. but when i use this code below,
session = ftplib.FTP('server.address.com','USERNAME','PASSWORD')

it says connection refused.

but server has another address. FTP address to backups: AAAgps.backup.somee.com and its own user name and password.
above code is works fine but he asked me to upload data to the MS SQL Server address but i can't log into it.

i can log into the ftp address but i can save files there. it also gives an error access denied. Please help :cry: :cry: :cry: :cry: :cry:

Re: FTP/DATABASE Help please

Posted: Wed Jun 11, 2014 7:00 pm
by redhawk
If your Pi sits behind a router you must add a port forwarding rule for TCP 20.

Richard S.

Re: FTP/DATABASE Help please

Posted: Wed Jun 11, 2014 11:17 pm
by DougieLawson
redhawk wrote:If your Pi sits behind a router you must add a port forwarding rule for TCP 20.

Richard S.
FTP uses port 20 & 21.

Re: FTP/DATABASE Help please

Posted: Thu Jun 12, 2014 8:19 pm
by redhawk
Indeed it does but as I understand an ftp client makes outgoing connection TCP 21 with local listening port TCP 20.
Since listening ports are a problem with (NAT) routers then really only TCP 20 would require a port forwarding rule (although it probably wouldn't hurt to forward 20 and 21 anyway).

Richard S.

Re: FTP/DATABASE Help please

Posted: Thu Jun 12, 2014 8:27 pm
by techpaul
Or find how to use PASSIVE mode FTP, ACTIVE mode uses port 20 and 21

Passive mode is for working from behind firewalls