over easter i installed a webcam in my vacation home. The pictures of this camera should land via local ftp on the central OpenWrt router (to be then transported further secured, but that's not the point here).
So the task was to configure the FTP server - vsftpd - to accept anonymous uploads (without password) and to store the pictures/videos in an arbitrary directory (here on a mounted/internal SSD, OpenWrt router is an apu1). Please note: the FTP server is explicitly not accessible from the outside in my setup!
If you are faced with a similar task, you can start with the vsftpd configuration shown below (unfortunately I didn't find anything suitable in the wiki and on the net):
/etc/vsftpd.conf background=YES listen=YES write_enable=YES check_shell=NO local_umask=022 ftp_username=nobody anonymous_enable=YES anon_root=/mnt/data/ftp anon_upload_enable=YES anon_mkdir_write_enable=YES anon_other_write_enable=YES anon_world_readable_only=NO no_anon_password=YES
Below the root directory (
/mnt/data/ftp) I created a directory
'camera' and authorized the owner "nobody" to it ... that's it!
For reference the vsftpd manpage: https://security.appspot.com/vsftpd/vsftpd_conf.html