On Thursday 03 Aug 2017 15:02:51 Walter Dnes wrote:
> On Thu, Aug 03, 2017 at 07:50:32AM -0700, Jeriko One wrote
> 
> > Are you able to upload files from other machines than this particular
> > VM? I don't have any problems uploading using your config.
> 
>   It fails uploading a test file from the linux machine hosting the VM.
> 
> > Who owns /home/ftp? I think by default vsftpd will change the owner
> > to root which would cause problems.
> 
>   I get more verbose error messages with the linux ftp client.  On the h
> 
> [i3][root][/dev/shm] ftp 192.168.123.251
> Connected to 192.168.123.251 (192.168.123.251).
> 220 (vsFTPd 3.0.2)
> Name (192.168.123.251:waltdnes): anonymous
> 530 Please login with USER and PASS.
> SSL not available
> 331 Please specify the password.
> Password:
> 230 Login successful.
> Remote system type is UNIX.
> Using binary mode to transfer files.
> ftp> put hello.txt
> local: hello.txt remote: hello.txt
> 200 PORT command successful. Consider using PASV.
> 553 Could not create file.
> ftp> bye
> 221 Goodbye.
> 
>   This was with the upload dir on 192.168.123.251 with permissions 555
> [d531][root][~] ll /home/ftp/
> total 8
> dr-xr-xr-x 2 ftp  ftp  4096 Aug  3 06:41 .
> drwxr-xr-x 6 root root 4096 Aug  3 06:41 ..

It could not create file because your ftp user:group do not have write 
permission.


>   If I change permissions on /home/ftp to 666, I get...
> 
> [i3][root][/dev/shm] ftp 192.168.123.251
> Connected to 192.168.123.251 (192.168.123.251).
> 220 (vsFTPd 3.0.2)
> Name (192.168.123.251:waltdnes): anonymous
> 530 Please login with USER and PASS.
> SSL not available
> 331 Please specify the password.
> Password:
> 500 OOPS: vsftpd: refusing to run with writable root inside chroot()
> Login failed.
> ftp> bye
> 
>   How is this supposed to work anyways?  Can't write to upload dir if
> it's not writable, but vsftpd refuses to run if the upload dir is
> writeable.  Help.

According to the man page here:

 https://security.appspot.com/vsftpd/vsftpd_conf.html

" ... the anonymous ftp user must have write permission on desired upload 
locations."

You may want to try setting

file_open_mode=0777

in your vsftpd.conf and check ftp user or group have write permissions within 
the /home/ftp/ directory.

-- 
Regards,
Mick

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to