mirror of
https://github.com/unraid/api.git
synced 2026-01-06 08:39:54 -06:00
fix: chown correctly (#1185)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated the approach to managing directory ownership for improved consistency across various environments. - Enhanced error handling in directory permission and ownership commands. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -379,8 +379,11 @@ else
|
||||
echo
|
||||
fi
|
||||
if [ "$CHOWN" = "y" ]; then
|
||||
find . -type d -exec chmod -v 755 {} \;
|
||||
find . -type d -exec chown -v root:root {} \;
|
||||
# Set strict mode and fail if commands fail
|
||||
set -e
|
||||
find . -type d -exec sudo chmod 755 {} + || exit 1
|
||||
find . -type d -exec sudo chown 0:0 {} + || exit 1
|
||||
set +e
|
||||
fi
|
||||
|
||||
# Ensure that the 'root' of the package is chmod 755 because
|
||||
|
||||
Reference in New Issue
Block a user