Setup vsFTPd on Debian/Ubuntu

  • Last Created On Dec 09, 2024
  • 8
0 0

Introduction

vsftpd stands for Very Secure FTP Daemon. It’s a lightweight FTP server. This short tutorial explains how to install vsftpd on Debian or Ubuntu. The commands in this tutorial require root privileges.

Step 1: Installation

Run the following command to install vsftpd:

apt-get install vsftpd

Step 2: Configuration

Open up the configuration file using your text editor of choice. This example uses vim.

vim /etc/vsftpd.conf

vsftpd allows anonymous users to access the server by default. This feature could be considered a security vulnerability. We will disable anonymous login by changing the following line:

anonymous_enable=NO

To allow local user login, uncomment the following line:

local_enable=YES

To enable uploading, uncomment the following line:

write_enable=YES

Save the file and close your text editor. Then, start vsftpd as a daemon:

service vsftpd start

At this point, you can log in your ftp server from your local computer.

Extras

If you want to prevent all local users from leaving their home directory, you need to uncomment this line from /etc/vsftpd.conf:

chroot_local_user=YES

As of vsftpd 2.3.5, the chroot directory must not be writable. You can change the permissions of this folder with the following command:

chmod a-w /home/user

Remember to restart the vsftpd daemon after editing vsftpd.conf.

service vsftpd restart
Views: 8

Recent Articles

  • How to Install JAX with ROCm Acceleratio...
    96
  • Deploy a PyTorch Workspace on a Vultr Cl...
    71
  • Managing Backup Storage
    83
  • Automating FTP Backups in Windows Server
    71
  • Automating FTP Backups in Linux
    75

Popular Articles

  • Our General Terms & Conditions
    2632
  • Our Privacy Policy
    2477
  • Our Cookies Policy
    275
  • Our Terms of Use
    152
  • How to Install JAX with ROCm Acceleratio...
    96