Score:1

FTPS. How to upload to a Home Folder only?

de flag

Ubuntu 20.04, server.

Wanted to configure the FTPS following instructions: https://devanswers.co/install-ftp-server-vsftpd-ubuntu-20-04/

Did all actions and got error with FileZilla: Response: 500 OOPS: cannot change directory:/var/www

The problem is I did the Step 4, method #1 firstly:

sudo usermod -d /var/www ftpuser
sudo chown ftpuser:ftpuser /var/www/html

After that I did Step 4, method #2

sudo mkdir /home/ftpuser/ftp
sudo chown nobody:nogroup /home/ftpuser/ftp

sudo chmod a-w /home/ftpuser/ftp
sudo mkdir /home/ftpuser/ftp/files
sudo chown ftpuser:ftpuser /home/ftpuser/ftp/files

Only 1 method should be done. This is my mistake. I'm quite new with Ubuntu server, my apologies for stupid questions. How to upload to a Home Folder only? (Method #2) The problem is 2 lines I did before, as I understand:

sudo usermod -d /var/www ftpuser
sudo chown ftpuser:ftpuser /var/www/html
J A S K I E R avatar
de flag
@steeldriver thank you)
Score:1
at flag

You should be able to change the home directory back and reverse the first two lines with:

sudo usermod -d /home/ftpuser ftpuser
sudo chown www-data:www-data /var/www

usermod -d sets the home folder for a user.

When configuring vsftpd you may also need to edit the /etc/vsftpd.conf file.

Change the line:

local_root=/fake/path

To:

local_root=/home/$USER/ftp/files

This should change the root directory to the path created in your example.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.