Yun and Gfoto, saved on SD Card then sent to FTP server

Dear Community

I am using a YUN Card running with Kernel Version 3.3.8 and trying to use a Canon D1200 Camera to take pictures, save it on the SD Card and then send it to the FTP server. Gphoto2 Version: 2.5.2. If I am trying to do it via a PUTTY Script (Terminal Windows) everything works perfectly fine. Ones I start a script on Linux for the YUN card, I can't save a pic on the SD card and then send it to a FTP Server.

I want to use this config for a Web Cam, as the Arduino Card could control heating and camera via a solar panel. I could not get it to work and on german websites there is a solution out there that someone or the creator unfortunately deleted. Therefore I am looking on the english forums for a solution. I am happy to share more information on the setup or software versions.

Looking forward to your help, as I can't figure it out.