VSFTPD says "500 OOPS: cannot change directory"

24,156

Solution 1

Looks like in order for the user to be able to be chroot'd to the directory configured, all the parent directories must have read and execute permissions, otherwise they will be denied for security reasons.

Solution 2

I think your users are going to be bound to their home directories with chroot_local_user=YES, maybe try setting your ftp user's home directory to /data/some-path/ftp/data/$USER else see what happens when with chroot_local_user=NO

Share:
24,156

Related videos on Youtube

Aman
Author by

Aman

Updated on November 22, 2022

Comments

  • Aman
    Aman over 1 year

    As soon as I login with my virtual users in ftp I get "cannot change directoy", I have the following configuration in vsftpd.conf. Please suggest

    listen=YES
    anonymous_enable=NO
    local_enable=YES
    write_enable=YES
    local_umask=002
    dirmessage_enable=YES
    xferlog_enable=YES
    connect_from_port_20=YES
    chroot_local_user=YES
    secure_chroot_dir=/var/run/vsftpd
    pam_service_name=vsftpd
    virtual_use_local_privs=YES
    guest_enable=YES
    user_sub_token=$USER
    hide_ids=YES
    user_config_dir=/data/some-path/ftp/users
    local_root=/data/some-path/ftp/data/$USER
    guest_username=vsftpd
    
    • Mathias R. Jessen
      Mathias R. Jessen over 11 years
      What does /var/log/vsftpd.log say?
  • Aman
    Aman over 11 years
    selinux is disabled.