chathura25
Posts: 20
Joined: Sat Mar 29, 2014 2:29 pm

FTP/DATABASE Help please

Wed Jun 11, 2014 6:44 pm

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:

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: FTP/DATABASE Help please

Wed Jun 11, 2014 7:00 pm

If your Pi sits behind a router you must add a port forwarding rule for TCP 20.

Richard S.

User avatar
DougieLawson
Posts: 35784
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: FTP/DATABASE Help please

Wed Jun 11, 2014 11:17 pm

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.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: FTP/DATABASE Help please

Thu Jun 12, 2014 8:19 pm

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.

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: FTP/DATABASE Help please

Thu Jun 12, 2014 8:27 pm

Or find how to use PASSIVE mode FTP, ACTIVE mode uses port 20 and 21

Passive mode is for working from behind firewalls
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

Return to “General discussion”