1. pi0tr3k

    pi0tr3k Well-Known Member Respected

    May 13, 2009
    3,054
    Hi guys,

    I cant make my FTP working .. I tried few tuts online and still I cant connect via FTP - it says
    Code:
    Error:    Connection timed out after 20 seconds of inactivity
    Error:    Could not connect to server
    What I did:
    PHP:
    sudo apt-get install vsftpd

    sudo nano 
    /etc/vsftpd.conf

    uncommented
    enable local_enable 
    YES;
    write_enable YES;
    local_umask 022;

    added
    local_root
    =/usr/share/nginx/html

    systemctl restart vsftpd

    I run nginx on Ubuntu 16.04

    Thx in advance
     
  2. pi0tr3k

    pi0tr3k Well-Known Member Respected

    May 13, 2009
    3,054
    I cant edit my own post? Anyway, I mean I cant connect via Filezilla , not FTP :D
     
  3. wedge1001

    wedge1001 Active Member Member

    May 29, 2012
    409
  4. pi0tr3k

    pi0tr3k Well-Known Member Respected

    May 13, 2009
    3,054
    Hi, I followed the link you provide me, and everything works great...

    There is one little problem only: every file I upload has -rw------- permissions only, and I have to chmod -R 755 /home/user every time I upload a file to read it in my browser and change the permissions to -rwxr-xr-x ...

    I dont know whats wrong, but it aint funny, do you have maybe a suggestion how to fix it so I dont have to chmod my dirs every time ?

    Thanks a lot
     
  5. wedge1001

    wedge1001 Active Member Member

    May 29, 2012
    409
    that's relativly easy to achive :)

    edit your /etc/vsftpd.conf

    search for
    local_umask
    if it's commented out, enable it
    it should then look like this:
    Code:
    local_umask=022
    
    additionaly you can comment in / modify
    Code:
    chmod_enable=YES
    file_open_mode=0755
    
    after a restart of the vsftpd it should now create files with chmod 755 -> ergo umask 022
    :)
     
  6. pi0tr3k

    pi0tr3k Well-Known Member Respected

    May 13, 2009
    3,054
    GREAT!!! Works like a charm. Big thumb up for your help buddy ;) thanks.
     

Share This Page