Subversion Repositories wimsdev

Rev

Rev 3878 | Go to most recent revision | Details | Compare with Previous | 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/wimsd
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 wimsd daemon  is currently unsecure. This is a debugging utility
4058 obado 23
  echo used to emulate a simple webserver. If you need this optional
3878 kbelabas 24
  echo functionality, please create a group 'nobody' or 'nogroup' containing
25
  echo user 'nobody', then re-run this script.
26
  echo Aborting
27
  exit 1
28
fi
29
 
30
if [ -f $file ]; then
31
  chown nobody:$group $file
32
  chmod 6755 $file
33
fi