1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

Merge pull request #584 from YunoHost-Apps/fix-empty-xargs

Add -r to xargs to not miserably fail when find doesn't list any file
This commit is contained in:
Éric Gaspar 2023-06-11 14:34:12 +02:00 committed by GitHub
commit 33a3e3a8ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 12 deletions

View file

@ -336,10 +336,10 @@ ynh_multimedia_addaccess $app
# Fix app ownerships & permissions
chown -R $app:www-data "$final_path"
chown -R $app: "$datadir"
find $final_path/ -type f -print0 | xargs -0 chmod 0644
find $final_path/ -type d -print0 | xargs -0 chmod 0755
find $datadir/ -type f -print0 | xargs -0 chmod 0640
find $datadir/ -type d -print0 | xargs -0 chmod 0750
find $final_path/ -type f -print0 | xargs -r0 chmod 0644
find $final_path/ -type d -print0 | xargs -r0 chmod 0755
find $datadir/ -type f -print0 | xargs -r0 chmod 0640
find $datadir/ -type d -print0 | xargs -r0 chmod 0750
chmod 640 "$final_path/config/config.php"
chmod 755 /home/yunohost.app
chmod 750 $final_path

View file

@ -139,10 +139,10 @@ mkdir -p "$datadir"
# Fix app ownerships & permissions
chown -R $app:www-data "$final_path"
chown -R $app: "$datadir"
find $final_path/ -type f -print0 | xargs -0 chmod 0644
find $final_path/ -type d -print0 | xargs -0 chmod 0755
find $datadir/ -type f -print0 | xargs -0 chmod 0640
find $datadir/ -type d -print0 | xargs -0 chmod 0750
find $final_path/ -type f -print0 | xargs -r0 chmod 0644
find $final_path/ -type d -print0 | xargs -r0 chmod 0755
find $datadir/ -type f -print0 | xargs -r0 chmod 0640
find $datadir/ -type d -print0 | xargs -r0 chmod 0750
chmod 640 "$final_path/config/config.php"
chmod 755 /home/yunohost.app
chmod 750 $final_path

View file

@ -452,10 +452,10 @@ exec_occ background:cron
# Fix app ownerships & permissions
chown -R $app:www-data "$final_path"
chown -R $app: "$datadir"
find $final_path/ -type f -print0 | xargs -0 chmod 0644
find $final_path/ -type d -print0 | xargs -0 chmod 0755
find $datadir/ -type f -print0 | xargs -0 chmod 0640
find $datadir/ -type d -print0 | xargs -0 chmod 0750
find $final_path/ -type f -print0 | xargs -r0 chmod 0644
find $final_path/ -type d -print0 | xargs -r0 chmod 0755
find $datadir/ -type f -print0 | xargs -r0 chmod 0640
find $datadir/ -type d -print0 | xargs -r0 chmod 0750
chmod 640 "$final_path/config/config.php"
chmod 755 /home/yunohost.app
chmod 750 $final_path