nsbin/set_permissions
Nico Schottelius d3c6e29902 Initial commit
2006-07-20 09:54:37 +02:00

17 lines
423 B
Bash
Executable file

#!/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' \;