ftp problem

Discussion in 'Server Operation' started by teves, Nov 16, 2006.

  1. teves

    teves Member

    Hello,

    I have installed a web server following the perfect setup howto for suse 10.1 and put ispconfig on it. I am using vsftpd as ftp server.
    Now my first page is online and I created a user. I can connect via ftp using that user, but I am not allowed to upload data. When I try so via ispconfig, I get the message: FTP: Failed to write Array/.htaccess

    When I try via Firefox and FireFTP, i get the output:
    200 Switching to Binary mode.
    PASV
    227 Entering Passive Mode (xxx,xxx,xxx,xxx,xxx,xxx)
    STOR favicon.ico
    550 Permission denied.
    TYPE A
    200 Switching to ASCII mode.
    PASV
    227 Entering Passive Mode (xxx,xxx,xxx,xxx,xxx,xxx)
    LIST
    150 Here comes the directory listing.
    226 Directory send OK.
    (xxx is the server IP)

    It is obvious that I am missing privileges, but why? And what can I do about it? What is wrong here? Any ideas?

    Thank you!
    regards, Tom
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /path/to/directory
    ? (Please replace /path/to/directory with your FTP directory.)
     
  3. teves

    teves Member

    Hello,

    this is the output you requested:
    (it's the directory web in the www.pagename.tld directory)

    drwxrwxr-x 4 web2_raji web2 4096 2006-11-15 15:05 .
    drwxr-xr-x 8 web2_raji web2 4096 2006-11-16 22:00 ..
    drwxrwxr-x 2 web2_raji web2 4096 2006-11-14 16:20 error
    -rw-rw-r-- 1 web2_raji web2 1289 2006-11-16 22:00 index.html
    drwxr-xr-x 2 web2_raji web2 4096 2006-11-16 04:00 stats

    web2_raji is the user I used to log in via ftp.

    regards,
    Tom
     
  4. falko

    falko Super Moderator Howtoforge Staff

    The permissions are ok. What's in /etc/vsftpd.conf?
     
  5. teves

    teves Member

    Hello Falko,

    the vsftpd.config file is rather large, so I cut out the most of the comments and the 'logging' part. Hope this is OK for you:

    # General Settings
    #write_enable=YES

    dirmessage_enable=YES
    #nopriv_user=ftpsecure
    ftpd_banner="Willkommen beim xxxxxxxxxxxxxx !"
    #ls_recurse_enable=YES
    #deny_email_enable=YES
    #banned_email_file=/etc/vsftpd.banned_emails
    #hide_ids=YES

    local_enable=YES
    #local_umask=022
    chroot_local_user=YES
    #chroot_list_enable=YES
    #chroot_list_file=/etc/vsftpd.chroot_list
    #local_max_rate=7200

    # deny root access (edited by tom)
    userlist_enable=YES
    userlist_file=/etc/vsftpd.user_list


    anonymous_enable=NO
    anon_world_readable_only=YES

    #anon_upload_enable=YES
    #anon_umask=022
    #anon_mkdir_write_enable=YES
    #anon_other_write_enable=YES
    #chown_uploads=YES
    #chown_username=whoever
    #anon_max_rate=7200


    # Transfer Settings
    connect_from_port_20=YES
    #idle_session_timeout=600
    #data_connection_timeout=120
    #async_abor_enable=YES
    #ascii_upload_enable=YES
    #ascii_download_enable=YES
    #pasv_enable=NO

    pam_service_name=vsftpd
    listen=NO
    ssl_enable=NO


    The userlist pointed at by the config file just contains root at the moment.
    The confíg file is pretty much the default config that comes with the installation. I did already suspect this file to be the problem, but I wasn't able to find the responsible line.

    regards, Tom
     
  6. falko

    falko Super Moderator Howtoforge Staff

    I think you should play around with these settings and see if this changes anything:

    userlist_enable=YES
    chown_uploads=YES
    chown_username=whoever
     
  7. teves

    teves Member

    Hello,

    thank you for your help, but in the meantime I found it out myself. I just needed to uncomment the line:

    #write_enable=YES

    It's pretty obvious, but I read a vsftp doc that made me believe that this command would allow anonymous writing on the server (which is correct, in some way).
    The whole truth is that it generally prevents/enables write commands for the whole ftp server (at least this is what I got from another doc.... :rolleyes: )

    So everything works for me just fine now.
    I wish to point out that ISPconfig is an extremely fine piece of software!

    thank you,
    regards, Tom
     

Share This Page