18 lines
423 B
Text
18 lines
423 B
Text
|
#!/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' \;
|