Question

VSFTPD in ubuntu 18.04 .. Cannot access directory filezilla

Posted January 18, 2019 10.1k views
Getting StartedUbuntu 18.04

Installed nginx on 18.04
installed vsftpd (change only: write_enable=YES)
created a server block
assigned ownership the ftpuser (brillftp) to server block directory.

here is the filezilla log:
Status: Connection established, waiting for welcome message…
Status: Server does not support non-ASCII characters.
Status: Logged in
Status: Retrieving directory listing…
Command: PWD
Response: 257 “/home/brillftp” is the current directory
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: PASV
Response: 227 Entering Passive Mode (142,94,81,13,47,231).
Command: LIST
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing
Status: Disconnected from server

Used the same procedure in UBUNTU 16.04 did not have this problem

Thanks,

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

There are a few changes you have to make to the vsftpd configuration file before you can start using FTP on Ubuntu 18.04.

Before editing the config file, create a backup.

sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.bak

Now, open the config file in nano editor.

sudo nano /etc/vsftpd.conf

Look for #write_enable=YES and uncomment it by removing the # sign. This will allow FTP users to write files to the server.

write_enable=YES

Look for #chroot_local_user=YES and uncomment it by removing the # sign. This will prevent FTP users from browsing outside their own directory.

chroot_local_user=YES

Look for #local_umask=022 and uncomment it by removing the # sign. This will give uploaded files and folders the correct permissions.

local_umask=022

Since Linux doesn’t show files beginning with a dot, files like .htaccess will not be visible in FTP. This may be a problem if you intend to use Apache and want to work with .htaccess.

To force vsftpd to show file names that begin with a dot, paste the following to the bottom of the file.

force_dot_files=YES

Lastly, let’s add some port ranges for passive FTP to make sure enough connections are available.

pasv_min_port=40000
pasv_max_port=50000

To save file and exit, press CTRL + X, press Y and then press ENTER.

Restart vsftpd.

sudo systemctl restart vsftpd
Submit an Answer