Permission denied while installing a system app with SSH
I found where the problem comes. When I want to change the rights on the file, the installation has already begun. I do not know exactly what happens during installation. So I downloaded the APK to the root file system, I change the permissions and copy the APK in /system/app with the -p argument to the cp command to keep the file permissions on the target.

if [[ $EUID -ne 0 ]]; then
   echo "&gt;&gt; This script must be run as root."
   exit 1
fi

echo "&gt;&gt; Remounting /system in write mode..."
mount -o rw,remount /system

echo "&gt;&gt; Installing Manager..."
wget -P / http://update.esmart.net/apk/Manager.apk
chmod 777 /Manager.apk
chown system:system /Manager.apk
cp -p -f /Manager.apk /system/app

echo "&gt;&gt; Removing smanager..."
rm /system/app/smanager*

echo "&gt;&gt; Remounting /system in read mode..."
mount -o ro,remount /system

echo "&gt;&gt; Starting Manager..."
sleep 2
am start -W -n ch.esmart.managerapp/.MainActivity

echo "&gt;&gt; Finished !"