nsbin/set_permissions

18 lines
423 B
Text
Raw Normal View History

2006-07-20 07:54:37 +00:00
#!/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' \;