So I have this script running, using inotifywait. One server puts images into a NFS folder on the host server at /var/nfs/device_images. (chmod is 777 on working folders) The host server then moves it into a working directory of a python script.
inotifywait -m /var/nfs/device_images -e create -e moved_to | while read path action file; do cp /var/nfs/drvie_images/$file /home/samuel/programname/images/$file; done
It works, kinda. The file itself transfers, but it's corrupt. It seems inotifywait tries to send the photo before it's totally transferred? Anyone have a solution?