Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error rsync code 23 #653

Open
aragon5956 opened this issue Oct 23, 2024 · 1 comment
Open

error rsync code 23 #653

aragon5956 opened this issue Oct 23, 2024 · 1 comment

Comments

@aragon5956
Copy link

hello,
I downloaded rsync from apt , and I got a error 23: rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main. c(1338) [sender=3.2.7] is this related to the remote repo owner being www-data, and I connect to the server with a different user? , if so how to avoid having the error

regards

@aragon5956
Copy link
Author

aragon5956 commented Oct 23, 2024

I found the case by myself, yes it is related , but I don’t see a way to solve the pb linked to the permission on the remote web server.

my bash script is :

#!/bin/bash

# Définir le mot de passe pour sshpass
PASSWORD="AAA"

# Définir l'utilisateur et l'hôte pour SSH
SSH_USER="ale"
SSH_HOST="x.x.x.x"

# Définir le chemin du projet distant
REMOTE_PATH="/var/www/webProject"

# Nettoyer le cache local
php bin/console cache:clear

# Synchroniser les fichiers avec rsync
sshpass -p "$PASSWORD" rsync -avz --copy-links\
    --exclude=".git/" \
    --exclude="connection.sh" \
    --exclude="deploy.sh" \
    --exclude=".env.local" \
    --exclude="download.sh" \
    --exclude="node_modules/" \
    --exclude="vendor/" \
    ./ "$SSH_USER@$SSH_HOST:$REMOTE_PATH/"


# Exécuter la commande de nettoyage de cache sur le serveur distant
sshpass -p "$PASSWORD" ssh -t "$SSH_USER@$SSH_HOST" "cd $REMOTE_PATH && php bin/console cache:clear --env=prod --no-debug"

# Définir l'utilisateur HTTP (normalement www-data pour Nginx)
#HTTPDUSER="www-data"

# Appliquer les ACL localement (notez que cela nécessite sudo, donc le mot de passe sera demandé)
#sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX var

#echo "Déploiement terminé avec succès!"

could you help me ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant