Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, I'm getting a huge problem and it's driving me crazy. I set up a ftp server using VSFTPd. Remote connections are working fine. I can connect then create, rename ...
  1. #1
    Just Joined!
    Join Date
    Aug 2010
    Posts
    3

    VSFTPD: Can't connect from localhost

    Hi,

    I'm getting a huge problem and it's driving me crazy.

    I set up a ftp server using VSFTPd.

    Remote connections are working fine. I can connect then create, rename and delete folders. I can upload files without any issue.

    BUT, each time i connect directly from the server (with the command "ftp localhost") i can't upload files either delete them.

    The only thing i can do is create folders. I'm getting error code "553: could not create file" when trying upload files.

    I triple checked the rights, everything is OK. I disabled SELinux (even if i don't like it).

    The weirdest thing is everything's working fine from remote host.

    If anyone has an idea... I do need localhost connection.

    Thank you

    Below my vsftpd.conf:


    listen=YES
    tcp_wrappers=YES
    anonymous_enable=NO
    local_enable=YES
    guest_enable=YES
    guest_username=ftp
    chroot_local_user=YES
    max_clients=50
    max_per_ip=4
    pam_service_name=vsftpd
    user_config_dir=/etc/vsftpd/users
    ssl_enable=NO
    userlist_enable=NO
    dual_log_enable=YES
    xferlog_enable=YES
    xferlog_std_format=YES
    log_ftp_protocol=YES
    virtual_use_local_privs=YES
    Below my user directive:


    local_root=/home/me
    write_enable=YES
    local_umask=007
    download_enable=YES

  2. #2
    Just Joined!
    Join Date
    Feb 2008
    Location
    Mauritius
    Posts
    8

    Hello there check

    Hi please check your

    Sestatus

    and check your iptables

    mainly disable them and check

    and let us know

    thanks

    and please post the error message

    and if you can post the log as well

    tailf /var/log/messages

    after trying to connect to vsftpd sevices

    thanks

    will try to help you as we need to know what error's there have a nice day god bless

    and be happy

  3. #3
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    623
    Don't see where you've gone wrong. If it's any help, I can do ftp localhost with vsftpd-2.2.2-6 64bit on Fedora 12. Selinux disabled. Commands get, put, etc, all work. Active vsftpd.conf directives are:

    Code:
    anonymous_enable=YES
    local_enable=YES
    write_enable=YES
    local_umask=022
    dirmessage_enable=YES
    xferlog_enable=YES
    connect_from_port_20=YES
    xferlog_std_format=YES
    listen=YES
    
    pam_service_name=vsftpd
    userlist_enable=YES
    tcp_wrappers=YES
    Is your issue only with localhost? I.E. can you ftp successfully if you use the actual IP address from the server to itself?

  4. #4
    Just Joined!
    Join Date
    Aug 2010
    Posts
    3
    Hi,

    SELinux is already disabled.

    My default iptables policy is to accept anything in and out.

    Below the error message from /var/log/vsftpd/log


    Fri Aug 20 09:38:08 2010 [pid 19610] [hostname] FTP command: Client "127.0.0.1", "TYPE I"
    Fri Aug 20 09:38:08 2010 [pid 19610] [hostname] FTP response: Client "127.0.0.1", "200 Switching to Binary mode."
    Fri Aug 20 09:38:08 2010 [pid 19610] [hostname] FTP command: Client "127.0.0.1", "PASV"
    Fri Aug 20 09:38:08 2010 [pid 19610] [hostname] FTP response: Client "127.0.0.1", "227 Entering Passive Mode (127,0,0,1,72,255)"
    Fri Aug 20 09:38:08 2010 [pid 19610] [hostname] FTP command: Client "127.0.0.1", "STOR /tmp/toto"
    Fri Aug 20 09:38:08 2010 [pid 19610] [hostname] FTP response: Client "127.0.0.1", "553 Could not create file."
    Fri Aug 20 09:38:08 2010 [pid 19610] [hostname] FAIL UPLOAD: Client "127.0.0.1", "/tmp/toto", 0.00Kbyte/sec

    There is nothing interesting about VSFTPD in /var/log/message.

    The issue is exactly the same when i'm connecting with:

    - ftp localhost
    - ftp 127.0.0.1
    - ftp 192.168.1.2

    greyhairweenie, I'm gonna try with your configuration.

    Thank you for your help

  5. #5
    Just Joined!
    Join Date
    Aug 2010
    Posts
    3
    I think i found out where is the issue.

    I tried to connect with ftp command from a remote linux server and got the same error than with localhost.

    FYI, the VSFTPD server is set up on RHEL 5.4.

    Then i tried with the lftp command from remote host and succeeded.

    I also tried the remote ftp command on a VSFTP ubuntu server and everything's fine.

    Maybe there is a bug with the 2.0.5 VSFTPD RHEL version. Ubuntu is running 2.0.6.

    On localhost RHEL with lftp command everything's fine.

    Thank you for your help anyway.

    Guillaume

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...