deadass fix it this time

This commit is contained in:
2025-10-18 14:29:58 -05:00
parent 27fb031175
commit 256b532938

View File

@@ -28,21 +28,24 @@ in {
# Fix ownership for archives directory
echo "starting ${archives_path}"
find "${archives_path}" -type d -exec sh -c 'chown root:archives "$@" chmod 770 "$@"' _ {} +
find "${archives_path}" -type f -exec sh -c 'chown root:archives "$@" chmod 660 "$@"' _ {} +
chown -Rc root:archives ${archives_path}
find "${archives_path}" -type d -exec chmod 2770 "$@" {} +
find "${archives_path}" -type f -exec chmod 660 "$@" {} +
# Fix ownership for media directory
echo "starting ${media_path}"
find "${media_path}" -type d -exec sh -c 'chown root:media "$@" chmod 770 "$@"' _ {} +
find "${media_path}" -type f -exec sh -c 'chown root:media "$@" chmod 660 "$@"' _ {} +
chown -Rc root:media ${media_path}
find "${media_path}" -type d -exec chmod 2770 "$@" {} +
find "${media_path}" -type f -exec chmod 660 "$@" {} +
# Fix user directories
for user_dir in ${users_path}/*; do
if [ -d "$user_dir" ]; then
user=$(basename "$user_dir")
echo "starting $user_dir"
find "$user_dir" -type d -exec sh -c 'chown $user:$user "$@" chmod 770 "$@"' _ {} +
find "$user_dir" -type f -exec sh -c 'chown $user:$user "$@" chmod 660 "$@"' _ {} +
chown -Rc $user:$user $user_dir
find $user_dir -type d -exec chmod 2770 "$@"' {} +
find $user_dir -type f -exec chmod 660 "$@"' {} +
fi
done
echo "fin"