12.10.2020, 06:46
This is possible, you just need to mount the USB drive correctly. Note that example uses paths for ftp username, not apps. If using this approach you only need to mount USB drive once and do not unmount it after writing.
Code:
-- create directory.
os.execute('mkdir -p /data/ftp/usb')
-- mount usb drive
os.execute('mount /dev/sda1 /data/ftp/usb/ -o dmask=0000,fmask=0000')