Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3878 | kbelabas | 1 | #! /bin/sh |
2 | # |
||
3 | # Fixes the uid of wrap..exec |
||
4 | # Must be run as root. |
||
5 | |||
6 | if [ ! "$(id -ru )" = 0 ]; then |
||
7 | echo |
||
8 | echo $0: Please run this script as root! |
||
9 | echo |
||
10 | exit 0 |
||
11 | fi |
||
12 | |||
13 | cd `dirname $0`/.. |
||
14 | |||
15 | file=public_html/bin/wrap..exec |
||
16 | group=`id -ng nobody` |
||
17 | case "$group" in |
||
18 | nobody|nogroup);; |
||
19 | *) group=;; |
||
20 | esac |
||
21 | if [ -z "$group" ]; then |
||
22 | echo $0: Your wims installation is currently unsecure. Please create a group |
||
23 | echo 'nobody' or 'nogroup' containing user 'nobody', then re-run this script. |
||
24 | echo Aborting |
||
25 | exit 1 |
||
26 | fi |
||
27 | |||
28 | if [ -f $file ]; then |
||
29 | chown nobody:$group $file |
||
30 | chmod 6755 $file |
||
31 | fi |
||
32 | rm -f log/unsecure |