I am trying to set home directory for FTP Server created on Azure VM (Linux) and I tried many ways taking help of google, but it throws error saying
- If I add $USER in local_root while modifying /etc/vsftpd.conf file
 
ftp> mkdir blob 550 Create directory operation failed.
- If I dont use $USER
 
500 OOPS: cannot change directory:/home/ftp
- I have set below configuration in /etc/vsftpd.conf file
 
    listen=NO
    
    listen_ipv6=YES
    
    anonymous_enable=NO
    
    local_enable=YES
    
    write_enable=YES
    
    anon_upload_enable=YES
    
    anon_mkdir_write_enable=YES
    
    dirmessage_enable=YES
    
    use_localtime=YES
    
    xferlog_enable=YES
    
    connect_from_port_20=YES
    
    chroot_local_user=YES
    
    user_sub_token=$USER
    
    local_root=/home/$USER/ftp
    
    allow_writeable_chroot=YES
    
    pasv_enable=YES
    
    pasv_min_port=10000
    
    pasv_max_port=10010
    
    chroot_list_file=/etc/vsftpd.chroot_list
    
    secure_chroot_dir=/var/run/vsftpd/empty
    
    pam_service_name=vsftpd
    
    rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
    
    rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
    
    ssl_enable=NO
Kindly help in fixing this issue while setting home directory for FTP Server (Azure VM).
                        
I got my answer. We have two ways to short out this issue.
Here is what I found as an explanation on Microsoft link-
as it makes azure configuration mode which results all the traffic in open mode
Please suggest better approach if any.