Shell Command to upload snapshot via FTP not working

I’m trying to automate the upload of my snapshot files to a NAS, I use this command (and it works correctly in terminal):

find /backup -type f -exec curl -u admin:password -T {} ftp://192.168.1.110/Hass.io/ \;

I then created a Shell Command with the same command:

shell_command:
    backup_snap_ftp: 'find /backup -type f -exec curl -u admin:password -T {} ftp://192.168.1.110/Hass.io/ \;'

When I call the shell command it fails.
If I call the same shell command but pointing at /config instead of /backup, using some test file, it works correctly.

/backup and /config have the same permissions:

drwxr-xr-x

the files under each folder have the same permissions.

For test I created a shell command that touches a file, under config it works, under backup does not. It seems clear that is permission related, but I can not really figure where is the problem.

Any help? :sob:

I am having exactly the same problem. What is the difference between the folders config and backup?

the only difference that I can think of is that home assistant is not authorized to work outside of the config directory, this could be the motivation of why in ssh all works well and not under HA

I created an add-on to do provide offsite backup for my Home Assistant. It mirrors my snapshots in /backup (and security camera snapshots and videos files in /media) to my own personal FTP server.

New Home Assistant Add-on: LFTP Mirror