Menu

[r10367]: / branches / 0.7 / build / freenas-modify-permissions.sh  Maximize  Restore  History

Download this file

52 lines (39 with data), 902 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
#
# Modify file permissions.
# Copyright © 2007 Volker Theile (votdev@gmx.de)
ROOTDIR=
echo "Modify file permissions..."
if [ ! -z "$1" ] && [ -d "$1" ]; then
ROOTDIR=$1;
echo "Using directory $1.";
fi
if [ -z $ROOTDIR ]; then
echo "=> No root directory defined.";
echo "=> Exiting..."
exit 1;
fi
# Change directory to given root.
cd $ROOTDIR
# usr/bin/su
echo "usr/bin/su"
chflags -RH noschg usr/bin/su
chmod 4755 usr/bin/su
# usr/bin/passwd
echo "usr/bin/passwd"
chflags -RH noschg usr/bin/passwd
# sbin/init
echo "sbin/init"
chflags -RH noschg sbin/init
# libexec/ld-elf.so.1
echo "libexec/ld-elf.so.1"
chflags -RH noschg libexec/ld-elf.so.1
# lib/libc.so.7
echo "lib/libc.so.7"
chflags -RH noschg lib/libc.so.7
# lib/libcrypt.so.4
echo "lib/libcrypt.so.4"
chflags -RH noschg lib/libcrypt.so.4
# lib/libthr.so.3
echo "lib/libthr.so.3"
chflags -RH noschg lib/libthr.so.3
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.