[Ubuntu]Vsftpd: refusing to run with writable root inside chroot()

Problem:when try to login ftp ,terminal has prompt an error about Vsftpd: refusing to run with writable root inside chroot() 

Root cause: From the vsftpd version 2.3.5 , the ftp share directory cannot be enable the writeable right.

Solution:

Step1.gedit /etc/vsftpd.conf and add the following                                   local_root=/srv/ftp                                                        chroot_local_user=YES                                                                         allow_writeable_chroot=YES                        

Step 2.open terminal and create a foler  for  upload/download function

sudo mkdir /srv/ftp/upload/                                                                   sudo chmod 777 /srv/ftp/upload/ -R                                                       sudo mkdir /srv/ftp/download/                                                               sudo chmod 755 /srv/ftp/download/ -R

FTP test:

ftp>get ./download/test1.txt

ftp>put test2.txt ./upload/test2.txt