Search code examples
pythonftplib

Am I committing a crime with the ftplib library?


With these three lines of Python code:

from ftplib import FTP
ftp=FTP("ftp.ncdc.noaa.gov")
ftp.login()

I successfully login to the FTP server of NOAA (National Oceanic and Atmospheric Administration), but I get this message printed as output:

'230-****** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ******** This is a United States Department of Commerce computer **** system, which may be accessed and used only for **** official Government business by authorized personnel. ** ** Unauthorized access or use of this computer system may **** subject violators to criminal, civil, and/or administrative **** action. All information on this computer system may be **** intercepted, recorded, read, copied, and disclosed by and **\n ** to authorized personnel for official purposes, including **** criminal investigations. Access or use of this computer **** system by any person, whether authorized or unauthorized, **** constitutes consent to these terms. **\n ****** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ******\n230 Anonymous access granted, restrictions apply'

Is this saying that I am not allowed to download files from that FTP server, unless I am an authorized personnel? Or is it just a warning that I should not try to somehow access and modify the server content? Sorry if I am not understanding it correctly, but that may be because I am not from the US, and I am not sure how cyber crime works in there.


Solution

  • You should be fine. NOAA FTP servers are open for general use, but there are a few rules around using scripts that you should take a look at.

    http://www.nws.noaa.gov/tg/general.php

    http://www.nws.noaa.gov/tg/dataprod.php