1

I have an instance running Ubuntu 16.0.4 LTS on Google Compute Engine with port 21 open to it. I have installed vsftpd on it, added a user for the ftp, and set the directory permissions to full access for the user. I am able to connect to the ftp server via command prompt using ftp -ip address- and log in with the username and password. Once in this way I am able to download and upload files as well as create and managed directories as needed. However, if I try to access the ftp server with Windows explorer using ftp://-ip address-, I get prompted for username and password as expected but when I enter them the server resets the connection immediately and I receive a message stating 'An error occurred opening that folder on the FTP Server. Make sure that you have permission to access that folder. Details: The connection with the server was reset.' Below is the contents of my vsftpd.conf file. How do I make this accessible from Windows Explorer?

listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=777
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=myftpuser
ftpd_banner=My FTP
ls_recurse_enable=YES
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

bumped to the homepage by Community 7 hours ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

  • 2
    a few things. 1)local_umask looks a bit off, umask stands for permissions - umask number, so in your case if you want to permit everyone - everything you should put umask of 000 instead. 2) What logs on your vsftpd server side say when you connect from windows? 3) Have you tried to use FTP client, e.g. Filezilla? – Dmitriy Kupch Dec 7 '18 at 18:57
  • 2
    I suggest the Explorer tries to use FTP active mode which does not work if you are behind some NAT router (i.e. typical SoHo router). Switch to passive mode - see How to configure Internet Explorer to use both the FTP PORT mode and the FTP PASV mode in the Windows Server 2003 Family. Windows Explorer should follow these settings too. – Steffen Ullrich Dec 7 '18 at 19:57
  • 1
    I have changed the umask to 000. This change alone made no change. – Todd Petersen Dec 7 '18 at 21:08
  • 1
    I changed the umask to 000 as suggested. That change makes sense to me. I also tried uncommenting the 2 ascii entries an the nopriv entry, changing the user on the latter to my ftp user. The result is still the same. Because of the intended use of the ftp server, using an ftp client like filezilla is out, as is using passive mode. I have not yet looked at transfer logs yet. I have set up other linux ftp servers before and have never had this issue, but those were on physical machines. Is it possible that the firewall in Google Compute Engine is causing this? – Todd Petersen Dec 7 '18 at 21:24
  • 1
    After setting up another local VM test machine identical to the VM instance in Google Compute Engine, I found that this appears to be related to the Google Cloud Platform VPC Network Firewall and not in the settings of the FTP server itself. Connecting via Windows Explorer to the local VM works fine. Does anyone know of a way to make this work with the Google Compute Engine instance? – Todd Petersen Dec 8 '18 at 13:13
0

Try the following settings:

local_umask=077
connect_from_port_20=NO
ascii_download_enable=YES
ascii_upload_enable=YES
nopriv_user=ftpuser

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.