Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jan 2002 18:22:35 +0200
From:      "Dave Raven" <dave@raven.za.net>
To:        <freebsd-questions@FreeBSD.org>
Subject:   More SUID...
Message-ID:  <002d01c1953c$05564200$3800a8c0@DAVE>

next in thread | raw e-mail | index | archive | help
Hello all,
I'm trying to get my sh script (with a goal of doing with perl) to run as
root.
I am probably doing it ALL wrong, but any help would be much appreciated.
This is what I have so far:

            [root@order] ~ # uname -mrs
            FreeBSD 4.4-STABLE i386
            [root@order] ~ # cat test.sh
            #!/bin/sh -p
            whoami
            echo "testtest" > /root/foo
            [root@order] ~ # ls -l test.sh
            -rwsr-xr-x  1 root  wheel  49 Jan  4 18:18 test.sh
            [root@order] ~ # su phoenix
            su-2.05$ ./test.sh
            phoenix
            ./test.sh: cannot create /root/foo: permission denied

    What is it I'm doing wrong?

Thanks again;
Dave.





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002d01c1953c$05564200$3800a8c0>