From: Samir Benmendil Date: Sun, 22 May 2016 20:45:16 +0000 (+0100) Subject: bin: update fix-skaro-permissions X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/091c19eecfe3a16f90c49a6e591b8e551ee02d9c bin: update fix-skaro-permissions --- diff --git a/bin/fix-skaro-permissions b/bin/fix-skaro-permissions index 864770d..f85692d 100755 --- a/bin/fix-skaro-permissions +++ b/bin/fix-skaro-permissions @@ -1,9 +1,9 @@ #!/bin/bash dir="/mnt/Skaro" -folders=(Documentaries eBooks Games "Install Discs" Movies Music roms Series Standup) +folders=(Documentaries eBooks games isos Movies Music roms Series Standup usenet) folders=( "${folders[@]/#/$dir/}" ) -sudo find "${folders[@]}" ! \( -user ramsi -a -group users \) -exec chown ramsi:users {} + -find "${folders[@]}" -type f ! -perm 644 -exec chmod 0644 {} + -find "${folders[@]}" -type d ! -perm 755 -exec chmod u=rwx,go=rx,a-s {} + +find "${folders[@]}" ! \( -user ramsi -a -group users \) -exec sudo chown ramsi:users {} + +find "${folders[@]}" -type f ! -perm 664 -exec chmod 0664 {} + +find "${folders[@]}" -type d ! -perm 775 -exec chmod ug=rwx,o=rx,a-s {} +