I understand that the vsftpd creates a default directory at /srv/ftp/
. However, on this particular server the directory /srv/
is not writable.
$ sudo apt-get install vsftpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
Recommended packages:
logrotate
The following NEW packages will be installed:
vsftpd
0 upgraded, 1 newly installed, 0 to remove and 86 not upgraded.
Need to get 0 B/153 kB of archives.
After this operation, 353 kB of additional disk space will be used.
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package vsftpd.
(Reading database ... 39125 files and directories currently installed.)
Preparing to unpack .../vsftpd_3.0.3-8+b1_amd64.deb ...
Unpacking vsftpd (3.0.3-8+b1) ...
Setting up vsftpd (3.0.3-8+b1) ...
mkdir: cannot create directory ‘/srv/ftp’: Permission denied
dpkg: error processing package vsftpd (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (232-25+deb9u1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
vsftpd
E: Sub-process /usr/bin/dpkg returned an error code (1)
As su I tried to mkdir /srv/ftp
which gives
mkdir: cannot create directory ‘ftp’: Permission denied
For background /srv/ is used as a place to mount datadisks so I assume this is why it is not possible to make a folder there. Is there a way to make the installation of vsftpd use a different directory to make the ftp folder elsewhere?