blob: 22ee005070a58f82e1f41b23194c82ed8fdeb154 [file] [log] [blame]
yuezonghe824eb0c2024-06-27 02:32:26 -07001#!/bin/bash
2
3DEST_DIR=$1
4
5chmod -R a+r $DEST_DIR/etc_ro
6find $DEST_DIR/bin -type f | xargs chmod a+x
7find $DEST_DIR/sbin -type f | xargs chmod a+x
8find $DEST_DIR/etc -type f | xargs chmod 644
9chmod 644 $DEST_DIR/etc/passwd
10chmod 640 $DEST_DIR/etc/shadow
11chmod 644 $DEST_DIR/etc/group
12chmod 644 $DEST_DIR/etc/services
13chmod 744 $DEST_DIR/etc/rc