deadass fix it this time
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user