Shell_command for FTP upload - permission or quote problem?

I am trying to ftp my full backup to a remote.
Configuration looks like this (get newest file in backup folder and ftp it with curl, internal only, so no SSL and auth)

shell_command:
  backup_ftp: cd /backup && cat $(ls -Art | tail -n 1) | curl -T - ftp://192.168.178.62:23/hass_backup/backup-$(date +"%Y-%m-%d")
Error running command: `cd /backup && cat $(ls -Art | tail -n 1) | curl -T - ftp://192.168.178.62:23/hass_backup/backup-$(date +"%Y-%m-%d")`, return code: 2
NoneType: None

If i run the command (even with the eval qoutes `` ) in HASS Terminal it works.

Is it a permission problem or is there something wrong with the evaluation of the command? or something else. Any ideas on this?

Maybe a quote problem - all my shell commands have single quotes surrounding them:

shell_command:
  backup_ftp: 'cd /backup && cat $(ls -Art | tail -n 1) | curl -T - ftp://192.168.178.62:23/hass_backup/backup-$(date +"%Y-%m-%d")'

This does not change anything. In log it is shown the same way as without single qoutes.