One line ftp server in python

前端 未结 9 1837
清歌不尽
清歌不尽 2020-12-07 08:03

Is it possible to have a one line command in python to do a simple ftp server? I\'d like to be able to do this as quick and temporary way to transfer files to a linux box wi

9条回答
  •  情书的邮戳
    2020-12-07 08:30

    Obligatory Twisted example:

    twistd -n ftp
    

    And probably useful:

    twistd ftp --help
    
    Usage: twistd [options] ftp [options].
    WARNING: This FTP server is probably INSECURE do not use it.
    Options:
      -p, --port=           set the port number [default: 2121]
      -r, --root=           define the root of the ftp-site. [default:
                        /usr/local/ftp]
      --userAnonymous=  Name of the anonymous user. [default: anonymous]
      --password-file=  username:password-style credentials database
      --version         
      --help            Display this help and exit.
    

提交回复
热议问题