I have an Ubuntu 16.04 web server. It only hosts one site using Nginx. I want to keep things very simple, and store the index.html file and the whole website in /var/www/html.
I need to be able to FTP files into /var/www/html. I have installed vsftp. I've created a user with the useradd command, which I'll call exampleuser. I then used this command:
sudo usermod -d /var/www/html exampleuser
... thinking that this would make the home directory of exampleuser to be the default directory when I log in by FTP.
However, when I attempt to log in by FTP, I get a "login error". I've checked and double checked my username and password and I'm certain they're correct, so I'm guessing it's a permissions issue (also because my experience is that most of the time in Linux when things don't work as hoped it's because of permissions). Though it's possible it could be a vsftpd configurations issue.
I think I've set the html directory in /var/www to have the right access:
/var/www$ ls -la
total 12
drwxr-xr-x 3 root root 4096 Nov 10 06:54 .
drwxr-xr-x 14 root root 4096 Nov 10 06:54 ..
drwxr-xr-x 2 exampleuser exampleuser 4096 Nov 10 08:04 html
What do I need to do so that I can ftp to /var/www/html?