Find the answer to your Linux question:
Results 1 to 2 of 2
Folks, Environment: Ubuntu 13.04 I have set up vsftpd to use virtual users as shown in Howto: Easy FTP with vsftpd . I have also downloaded the latest version of ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Posts
    23

    vsftpd - can upload but cannot download


    Folks,

    Environment: Ubuntu 13.04

    I have set up vsftpd to use virtual users as shown in Howto: Easy FTP with vsftpd.

    I have also downloaded the latest version of vsftpd from thefrontiergroup/vsftpd repository. The installed version is 2.3.5
    This version fixes "vsftpd refusing to run with writable root inside chroot" problem.

    The directory to write to is /home/ftpdir and the user account for ftp is ftpusers.

    Here is the content of /etc/vsftpd/ftpusers:

    write_enable=YES
    anon_mkdir_write_enable=YES
    anon_other_write_enable=YES
    anon_upload_enable=YES
    local_root=/home/ftpdir
    chroot_local_user=YES
    dirlist_enable=YES
    download_enable=YES
    guest_username=ftpusers
    local_umask=022
    file_open_mode=0666

    When run, I am able to upload files from a ftp client. However, download fails with a "550 Failed to open file" error.

    Here are the permissions on a file that is uploaded:

    $ sudo ls -l /home/ftpdir
    -rw------- 1 ftpusers ftpusers 9 Jun 12 01:13 3.txt

    However, the same file cannot be downloaded.

    If I manually chmod 666 on the file, the download works fine.

    There are two issues here that I don't understand:

    1. If the ftp client connection is chrooting to ftpusers, why upload works and not download?

    2. Although my file open mode is set as 0666, why does the created file have just 600 mode?

    I would appreciate it if someone can help me understand these issues.

    Thank you in advance for your help.

    Regards,
    Peter
    Last edited by PeterTaps; 06-12-2013 at 08:08 PM.

  2. #2
    Just Joined!
    Join Date
    Sep 2013
    Location
    Hyderabad
    Posts
    29
    comment the local umask
    change the permissions to 755
    check the permissions of the files you try to download, such that they have all the permissions to access those files
    check the firewall for port permissions

    add this line

    anonymous_enable=YES

Posting Permissions

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