From: rpblake@ASSP01.open.ac.uk (Robert Blake)
Subject: Help: Set-user-ID
Date: 07 Mar 1995 15:17:55 GMT [thread overview]
Message-ID: <RPBLAKE.95Mar7081755@ASSP01.open.ac.uk> (raw)
I've been trying to write a shell script that other users can run and appear
to be me for the duration of the command. I'm using Alpha OSF/1 v1.3.
I've written a very simple shell script called fred:
#!/bin/sh
echo Hi!!
whoami
rm /usr/user1/temp/test~
test~ is a file that only user1 has write permission to. Having written this as
user1, I then 'chmod 4655 fred' so the permissions look thus:
-rwSr-xr-x 1 user1 physics 117 Mar 07 14:53 fred
I then log in as user2 and try to run it. The output is:
Hi!!
user2
rm: override protection 700 for /usr/user1/temp/test~? y
rm: /usr/user1/temp/test~ not removed. Permission denied
Anyone any idea what I'm doing wrong?
---------------------------------------------------------------------------
_/_/_/_/_/
_/ _/ _/ Rob Blake (R.P.Blake@open.ac.uk)
_/ _/ _/ [Overworked PhD student (Danger! Irony chip overload)]
_/_/_/_/_/
_/_/ _/ Quote of the week : "An optimist believes that this is
_/ _/ _/ the best of all possible worlds. A pessimist fears
_/ _/_/_/ that this is true."
---------------------------------------------------------------------------
next reply other threads:[~1995-03-07 15:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-03-07 15:17 Robert Blake [this message]
1995-03-08 16:02 ` Help: Set-user-ID Mike Simons
1995-03-08 22:33 ` Walter Karig
1995-03-09 3:37 ` Spider Boardman
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox