I have a user on my server (Debian) that I will be using for FTP. For a given directory on the file system, he is able to create directories/create files.
myuser@debian-server:/storage$ su ftp_accesser
Password:
ftp_accesser@debian-server:/storage$ echo "foobar" > foobar.txt
ftp_accesser@debian-server:/storage$ mkdir -v foobar2
mkdir: created directory 'foobar2'
ftp_accesser@debian-server:/storage$ ls -l
total 448380
drwxr-xr-x 2 root root 4096 Mar 25 19:32 other_dir
drwxrwxr-x 2 ftp_accesser ftp_accesser 4096 Apr 9 11:32 foobar2
-rw-rw-r-- 1 ftp_accesser ftp_accesser 7 Apr 9 11:31 foobar.txt
ftp_accesser@debian-server:/storage$
I am also running the vsftpd
server on this server. I attempt to do the same thing as above (with the files removed, of course) using the ftp
client.
Connected to localhost.
220 (vsFTPd 3.0.3)
Name (localhost:myuser): ftp_accesser
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd /storage
250 Directory successfully changed.
ftp> mkdir foobar3
550 Permission denied.
ftp> put /home/myuser/foobar.txt foobar.txt
local: /home/myuser/foobar.txt remote: foobar.txt
200 PORT command successful. Consider using PASV.
550 Permission denied.
ftp>
Is there a way to allow ftp_accesser to put/mkdir files onto the server?
guest_enable
oruser_config_dir
? – Jeff Schaller♦ Apr 9 '19 at 19:03vsftp
to allow writes? The default configuration ofvsftp
is usuallywrite_enable=NO
in/etc/vsftpd.conf
. – GracefulRestart Apr 9 '19 at 19:07