################################################################ # This script sets the build's file permissions and ownership # # Version History: # 2006Nov24 : TLS : Added perms for /usr/local/sbin # 2006Nov22 : TLS : Added root dir perms # 2006Oct26 : TLS : Created # ################################################################ set -x # Set default ownership chown -R $SUDO_USER:netadms * # Set script perms chmod 775 *.sh chmod 775 scripts/*.sh chmod 775 include/*.sh # Set xml files chmod 664 *.xml # Root files for FILE in `find root/ -type f | grep -v svn`; do chmod 664 ${FILE}; done for DIR in `find root/ -type d | grep -v svn`; do chmod 775 ${DIR}; done chmod 775 root/etc/cron.*/* chmod 660 root/etc/snmpd* chmod 775 root/etc/rc.d/init.d/* chmod 755 root/root chmod 755 root/root/.ssh chmod 664 root/root/.ssh/authorized_keys chmod 775 root/usr/local/bin/* chmod 775 root/usr/local/sbin/*