开发者社区> 问答> 正文

ftp客户端连接不上ftp服务器?

1、在本地自己电脑的命令行,输入密码之后就报下面的错误:



C:\Users\Administrator>ftpftp> open www.chunwenxue.site
连接到 www.chunwenxue.site。220 vsFTPd 2.3.5+ (ext.1) ready...
用户(www.chunwenxue.site:(none)): gzh331 Please specify the password.
密码:

GThread-ERROR **: file gthread-posix.c: line 140 (g_thread_impl_init): error 'Operation not permitted' during 'pthread_getschedparam (pthread_self(), &policy, &
sched)'aborting...
500 OOPS: priv_sock_get_result远程主机关闭连接。














2、在本地自己电脑,用cuteFTP也是连接不上。报错信息如下:



        *** CuteFTP 9.0 - build Nov  9 2012 ***

STATUS:>      [2015/12/10 14:54:00] Getting listing ""...STATUS:>      [2015/12/10 14:54:00] Resolving host name ftp.chunwenxue.site...
STATUS:>      [2015/12/10 14:54:00] Host name ftp.chunwenxue.site resolved: ip = 218.30.64.199.STATUS:>      [2015/12/10 14:54:00] Connecting to FTP server... ftp.chunwenxue.site:21 (ip = 218.30.64.199)...
ERROR:>       [2015/12/10 14:54:15] The connection failed due to an error or timeout.        1) Verify that the destination IP address is correct.
        2) Increase the connection timeout threshold under Global Settings | Connection.        3) Switch to the opposite data connection type (PASV or PORT) under Site Settings | Type tab.
        4) Verify that the problem is not local by trying to connect to an alternate server.        5) If a server name was used, verify it resolves to the correct address.
        6) If using a local server table for server name resolution, check to see that it doesn't resolve to an obsolete address.        7) Try pinging the address.
        8) If you are using a router, verify the router is up and running (check by pinging it and then ping an address outside of the router).        9) Do a traceroute to the destination to verify all routers along the connection path are operational.
        10) Verify that your subnet mask is setup properly.        11) Verify that your local software or hardware firewall is not blocking outbound connections originating from CuteFTP.
        12) Verify that your anti-virus software is not at fault (try disabling it).STATUS:>      [2015/12/10 14:54:15] Waiting 30 seconds...










注:gzh/密码,这个是新建的用户。

展开
收起
内向 2015-12-10 14:56:24 34890 0
7 条回答
写回答
取消 提交回答
  • Reftp客户端连接不上ftp服务器?
    如果是私有网络,ftp需要设置下,不能用默认设置
    2018-09-12 20:59:49
    赞同 展开评论 打赏
  • 阿里云最新1888元代金券一键领取地址:https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=se6p9xeg
    Reftp客户端连接不上ftp服务器?
    1.安全组放行21端口
    2.还是不行的话 换个FTP软件试试  比如flashfxp之类的
    2018-09-12 17:34:06
    赞同 展开评论 打赏
  • 需要在安全组放行端口21,如果是被动模式 还需要放行39000-40000(要看服务端的设置)。


     
    2018-09-11 17:50:58
    赞同 展开评论 打赏
  • Reftp客户端连接不上ftp服务器?
    阿里云为了安全,限制了的
    2018-09-10 09:07:59
    赞同 展开评论 打赏
  • Reftp客户端连接不上ftp服务器?
    我也遇到同样的问题,FTP就是连接不上ECS
    2018-09-08 20:02:06
    赞同 展开评论 打赏
  • Reftp客户端连接不上ftp服务器?
    服务端 安装好ftp了么?
    服务器内登录试试

    -------------------------

    回 3楼内向的帖子
    那检查ftp配置 与防火墙配置是否允许外网访问 21端口是否放行
    2015-12-10 17:54:38
    赞同 展开评论 打赏
  • Reftp客户端连接不上ftp服务器?
    端口21是打开的。



    ------------
    netstat -na命令,输出如下:


    login as: root
    root@182.92.197.238's password:
    Last login: Thu Dec 10 14:10:08 2015 from 111.113.22.138

    Welcome to aliyun Elastic Compute Service!


    [root@iZ25p3ad0ffZ ~]# netstat -na
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address               Foreign Address             Stat                                                                                        e
    tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LIST                                                                                        EN
    tcp        0      0 0.0.0.0:21                  0.0.0.0:*                   LIST                                                                                        EN
    tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LIST                                                                                        EN
    tcp        0      0 0.0.0.0:8888                0.0.0.0:*                   LIST                                                                                        EN
    tcp        0      0 127.0.0.1:8005              0.0.0.0:*                   LIST                                                                                        EN
    …………

    [root@iZ25p3ad0ffZ ~]#  

    -------------------------

    回 2楼龙吟风的帖子
    服务器内是可以登录的。



    -------------------

    [root@iZ25p3ad0ffZ ~]# lftp gzh:gzh1208@localhost
    lftp gzh@localhost:~>

    -------------------------

    回 4楼龙吟风的帖子
    1、端口21,已经是打开的,提问帖子里就已经列出来的。
    vsftpd服务也已经启动。

    2、都说要看vsftpd配置文件啥的,请问要配置啥?
    我只是创建一个用户访问ftp服务器而已,还需要配置什么?


    ----------------
    完整的配置文件如下:


    # Example config file /etc/vsftpd/vsftpd.conf
    #
    # The default compiled in settings are fairly paranoid. This sample file
    # loosens things up a bit, to make the ftp daemon more usable.
    # Please see vsftpd.conf.5 for all compiled in defaults.
    #
    # READ THIS: This example file is NOT an exhaustive list of vsftpd options.
    # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
    # capabilities.
    #
    # Allow anonymous FTP? (Beware - allowed by default if you comment this out).
    anonymous_enable=NO
    #
    # Uncomment this to allow local users to log in.
    local_enable=YES
    #
    # Uncomment this to enable any form of FTP write command.
    write_enable=YES
    #
    # Default umask for local users is 077. You may wish to change this to 022,
    # if your users expect that (022 is used by most other ftpd's)
    local_umask=022
    #
    # Uncomment this to allow the anonymous FTP user to upload files. This only
    # has an effect if the above global write enable is activated. Also, you will
    # obviously need to create a directory writable by the FTP user.
    anon_upload_enable=NO
    #
    # Uncomment this if you want the anonymous FTP user to be able to create
    # new directories.
    anon_mkdir_write_enable=NO
    #
    # Activate directory messages - messages given to remote users when they
    # go into a certain directory.
    dirmessage_enable=YES
    #
    # Activate logging of uploads/downloads.
    xferlog_enable=YES
    #
    # Make sure PORT transfer connections originate from port 20 (ftp-data).
    connect_from_port_20=YES
    #
    # If you want, you can arrange for uploaded anonymous files to be owned by
    # a different user. Note! Using "root" for uploaded files is not
    # recommended!
    #chown_uploads=YES
    #chown_username=whoever
    #
    # You may override where the log file goes if you like. The default is shown
    # below.
    xferlog_file=/var/log/vsftpd.log
    #
    # If you want, you can have your log file in standard ftpd xferlog format.
    # Note that the default log file location is /var/log/xferlog in this case.
    #xferlog_std_format=YES
    #
    # You may change the default value for timing out an idle session.
    #idle_session_timeout=600
    #
    # You may change the default value for timing out a data connection.
    #data_connection_timeout=120
    #
    # It is recommended that you define on your system a unique user which the
    # ftp server can use as a totally isolated and unprivileged user.
    #nopriv_user=ftpsecure
    #
    # Enable this and the server will recognise asynchronous ABOR requests. Not
    # recommended for security (the code is non-trivial). Not enabling it,
    # however, may confuse older FTP clients.
    #async_abor_enable=YES
    #
    # By default the server will pretend to allow ASCII mode but in fact ignore
    # the request. Turn on the below options to have the server actually do ASCII
    # mangling on files when in ASCII mode.
    # Beware that on some FTP servers, ASCII support allows a denial of service
    # attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
    # predicted this attack and has always been safe, reporting the size of the
    # raw file.
    # ASCII mangling is a horrible feature of the protocol.
    ascii_upload_enable=YES
    ascii_download_enable=YES
    #
    # You may fully customise the login banner string:
    #ftpd_banner=Welcome to blah FTP service.
    #
    # You may specify a file of disallowed anonymous e-mail addresses. Apparently
    # useful for combatting certain DoS attacks.
    #deny_email_enable=YES
    # (default follows)
    #banned_email_file=/etc/vsftpd/banned_emails
    #
    # You may specify an explicit list of local users to chroot() to their home
    # directory. If chroot_local_user is YES, then this list becomes a list of
    # users to NOT chroot().
    # (Warning! chroot'ing can be very dan gerous. If using chroot, make sure that
    # the user does not have write access to the top level directory within the
    # chroot)
    #chroot_local_user=YES
    #chroot_list_enable=YES
    # (default follows)
    #chroot_list_file=/etc/vsftpd/chroot_list
    #
    # You may activate the "-R" option to the builtin ls. This is disabled by
    # default to avoid remote users being able to cause excessive I/O on large
    # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
    # the presence of the "-R" option, so there is a strong case for enabling it.
    #ls_recurse_enable=YES
    #
    # When "listen" directive is enabled, vsftpd runs in standalone mode and
    # listens on IPv4 sockets. This directive cannot be used in conjunction
    # with the listen_ipv6 directive.
    listen=YES
    #
    # This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
    # sockets, you must run two copies of vsftpd with two configuration files.
    # Make sure, that one of the listen options is commented !!
    #listen_ipv6=YES

    pam_service_name=vsftpd
    userlist_enable=YES
    tcp_wrappers=YES

    convert_charset_enable=1
    local_charset=UTF8
    remote_charset=WIN1251
    double_377=0

    #pasv_addr_rules=/etc/vsftpd/vsftpd.pasv_rules

    anti_bruteforce=1
    anti_bruteforce_banner=Bruteforce detected. Server in safe mode.

    http_enable=no
    ftp_enable=yes
    http_browse=no

    http_browse_tpl=/etc/vsftpd/vsftpd-browse.html
    http_browse_line_tpl=/etc/vsftpd/vsftpd-browse_line.html
    http_error_403_server_tpl=/etc/vsftpd/vsftpd-403-serv.html
    http_error_403_tpl=/etc/vsftpd/vsftpd-403.html
    http_error_404_tpl=/etc/vsftpd/vsftpd-404.html

    one_process_model=no
    2015-12-10 17:06:36
    赞同 展开评论 打赏
滑动查看更多
问答排行榜
最热
最新

相关电子书

更多
如何运维千台以上游戏云服务器 立即下载
网站/服务器取证 实践与挑战 立即下载
ECS快储存加密技术 立即下载