Install vsftpd on Debian 9

If you need a FTP server, vsftp could be a good choice.
It’s easy to setup and it works, in this tutorial I wanted to achieve a basic FTP server with:
– local user authentification
– anonymous disabled
– write permission
– jail users to their home directory.

Note: Because the authentification is in plain text, I don’t recommend using FTP servers only in secure environments.

1. Install

apt-get install vsftpd

2. Configure by editing /etc/vsftpd.conf and setting the following options.

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
chroot_local_user=YES
user_sub_token=$USER
local_root=/home/$USER
allow_writeable_chroot=YES

3. Restart the service

systemctl restart vsftpd

Observation: If your machine has disabled IPv6, make sure you disabled IPv6 from the config file also (listen_ipv6=NO).

How to change the hostname in macOS

If you need to change the hostname of your Mac here is a simple command:

sudo scutil --set HostName my_hostname

Also you can change the ComputerName via CLI.

sudo scutil --set ComputerName my_computer_name

Now check the values with the get parameter.

sudo scutil --get HostName
sudo scutil --get ComputerName