Ftp freezes despite connection seems allright

23
2014-04
  • Alfred M.

    I am trying to connect to a an ftp through command line using

    ftp ftpperso.free.fr
    

    I am then prompted for username and password.

    I get this message

    230 User username logged in.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    

    and status confirms that I am connected to the server.

    However when I then try any command (ie. ls) the console freezes and nothing happens.

    Do you have any idea of what is going on?

  • Answers
  • Michael Hampton

    You are probably behind a NAT, and therefore need to enable passive mode before doing anything.

    ftp> passive
    Passive mode on.
    

  • Related Question

    550 operation not permitted using FTP
  • monkey_boys

    I'm using FTP to manage some files on a site I run but keep seeing this (truncated) error log:

    Command:    DELE calendarpermission.php
    Response:   550 calendarpermission.php: Operation not permitted
    [...]
    Command:    DELE button_down.gif
    Response:   550 button_down.gif: Operation not permitted
    Command:    CWD /domains/example.com/public_html/admincp
    Response:   250 CWD command successful
    Command:    PWD
    Response:   257 "/domains/example.com/public_html/admincp" is the current directory
    Command:    RMD control_examples
    Response:   550 control_examples: Operation not permitted
    Command:    CWD /domains/example.com/public_html
    Response:   250 CWD command successful
    Command:    PWD
    Response:   257 "/domains/example.com/public_html" is the current directory
    Command:    RMD admincp
    Response:   550 admincp: Operation not permitted
    Status: Retrieving directory listing...
    Command:    PASV
    Response:   227 Entering Passive Mode (122,155,5,50,138,244).
    Command:    MLSD
    Response:   150 Opening ASCII mode data connection for MLSD
    Response:   226 Transfer complete
    Status: Directory listing successful
    Status: Set permissions of '/domains/example.com/public_html/admincp' to '777'
    Command:    SITE CHMOD 777 admincp
    Response:   550 CHMOD 777 admincp: Operation not permitted
    

    What do I do to solve this?


  • Related Answers
  • Tom Wijsman

    If

    Command:    SITE CHMOD 777 admincp
    Response:   550 CHMOD 777 admincp: Operation not permitted
    

    occurs then it means that you have absolutely no permissions to do that, you should resolve this problem with your hosting so that they can give your permissions; maybe that folder is has the purpose to stay?

  • hobs

    /domains/example.com/public_html/admincp may be owned by root. It may have been created by PHP and that would be why it is owned by root. Regardless, the user you logged into through ftp isn't allowed to modify the permissions of that file (or it doesn't exist).

  • Tomáš Fejfar
    Command:    SITE CHMOD 777 admincp
    Response:   550 CHMOD 777 admincp: Operation not permitted
    

    Means that the the FTP user does not own the file/folder you're trying to chown. They may be in the same group and have full access to the file, but only the owner can chmod a file (or root/sudo). To resolve this you need to own the file (delete + recreate from backup not perserving owners/rights may work)