Configuring ftp server

An ftp server is being used by Drupal when installing new modules. For some reason Drupal uses ftp to copy uploaded files to the filesystem, even when the filesystem is on the same system as the web server.

Furthermore some development tools running outside the vm, e.g. NetBeans on the host is using ftp to synchronize files between the vm and the host.

I use vsftpd as ftp-server. The script installs vsftpd and generates vsftpd.conf.

It is configured in /etc/vsftpd.conf. Compared to default setup, the following parameters are changed:

  • local_umask  to 022. This ensures that the www-data user is able to read files uploaded by other users.
  • write_enable to yes. This enables ftp users (e.g. NetBeans) to upload files.

Port forwarding is not required since we have given the vm its own ip and the domain name

You can learn more on vsftpd setup in how-to-setup-and-use-ftp-server-in-ubuntu-linux, when reading about “Stand-alone vs Normal FPT mode”, have in mind that this setup uses Stand-alone mode.

One thought on “Configuring ftp server

  1. FTP is a good option only when there is someone to manage it well. However, Binfer is a cheaper and more secure alternative to FTP. See FTP alternative.

Leave a Reply

Your email address will not be published. Required fields are marked *