set_permissions 423 Bytes
Newer Older
Nico Schottelius's avatar
Nico Schottelius committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/sh

#
# /usr/bin is obsolete
# /usr/lib is obsolete
# /usr/*/{bin,lib,...} is now the correct path
#
USR="/usr/*"

for tmp in $USR;do
   echo chown root.`echo "$tmp" | sed 's,/usr/,,'` -R $tmp
done

find /usr -exec 'if   [ -d "$1" ];then chmod u=rwx,g=rx,o-rwx $1 
                 elif [ -x "$1" ];then chmod u+rw,g+rx,o-rwx $1
                 else                  chmod u+rw,g+r,o-rwx $1
                 fi' \;