Where is vsftpd home directory located on Ubuntu 16.04 LTS, and where does it store files?
1 Answer
It depends on your configuration - see man vsftpd.conf. There are two major cases:
By default the anonymous log-in is not enabled. So you must log-in with a system user. For example if you are logging-in with
user1
you will be redirected to its$HOME
directory, that should be/home/user1/
.If you have enabled the anonymous log-in by the option directive
anonymous_enable
, you must specify alsoanon_root
. For example, to enamle the minimal anonymous configuration:Add these two lines to
/etc/vsftpd.conf
:anonymous_enable=Yes anon_root=/home/ftp/
Create the directory and restart the service:
sudo mkdir /home/ftp/ sudo systemctl restart vsftpd.service
Note with this configuration the users are not permitted to upload files. This is more complicated task...
-
The
/etc/vsftpd.conf
haveanonymous_enable=NO
,write_enable=YES
both uncommented, there is dedicated user with password. But I can't find file in/home/user/
directory. Possibly the transfer was unsuccessful, although the/var/log/vsftpd.log
show user login ` [user] OK LOGIN: Client "IP address"`.– fxgreenSep 4, 2018 at 21:36 -
@fxgreen, unfortunately
vfsftpd
doesn't write logs for the denied operations. Here is how my log file looks like after successful upload: paste.ubuntu.com/p/KG4PgFZNkP. How did you create theuser
and/home/user/
? I mean, does theuser
is a owner of/home/user/
?– pa4080Sep 5, 2018 at 6:01 -
I don't remember how I created the ftp user, but it has the following permissions:
$ ls -ld /home/user1ftp
drwxr-xr-x 16 user1ftp user1ftp 4096 Jun 9 14:45 /home/user1ftp
.– fxgreenSep 5, 2018 at 16:36
/var/log/xferlog
, readman vsftpd;man vsftpd.conf
/var/log/xferlog
: no such file exist in my /var/log/ directory.