0

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?

3
  • Have you done anything special to your vsftpd.conf? e.g. guest_enable or user_config_dir? – Jeff Schaller Apr 9 '19 at 19:03
  • Have you configured vsftp to allow writes? The default configuration of vsftp is usually write_enable=NO in /etc/vsftpd.conf. – GracefulRestart Apr 9 '19 at 19:07
  • "write_enable=YES" was commented out for whatever reason. Thanks for the fix! – Godot_finder Apr 9 '19 at 23:13
0

It turns out that write_enable=YES was commented out in my /etc/vsftpd.conf file. Once I uncommented that and restarted the server, I was successfully able to create a directory and put a file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.