#!/bin/bash | |
DEST_DIR=$1 | |
chmod -R a+r $DEST_DIR/etc_ro | |
find $DEST_DIR/bin -type f | xargs chmod a+x | |
find $DEST_DIR/sbin -type f | xargs chmod a+x | |
find $DEST_DIR/etc -type f | xargs chmod 644 | |
chmod 644 $DEST_DIR/etc/passwd | |
chmod 640 $DEST_DIR/etc/shadow | |
chmod 644 $DEST_DIR/etc/group | |
chmod 644 $DEST_DIR/etc/services | |
chmod 744 $DEST_DIR/etc/rc |