Could someone please explain sticky bit 4000 to me!
Need to accomplish following:
move files from an unprivileged account to a dir such as /usr/bin in
which the user can not write.
omsa01>ls -ld /usr/bin
drwxr-xr-x 5 root system 16384 Feb 25 13:31 /usr/bin
Unpriviledge home account looks like following account name is
jhorvath
omsa01>ls -l
total 2767
-rwxr-xr-x 1 jhorvath users 1499 Aug 20 1996 .cshrc
-rwxr-xr-x 1 jhorvath users 1668 Aug 20 1996 .login
-rw-r--r-- 1 jhorvath users 1606 Apr 15 1997 .profile
-rw------- 1 jhorvath users 14624 Feb 25 13:43 .sh_history
drwxr-xr-x 2 jhorvath users 8192 Nov 1 17:14 bin
-rw-r--r-- 1 root users 3294 Feb 5 08:38 danc_config.dat
-rwsr-xr-x 1 root users 102 Feb 25 13:43 mvscript.com
-rwxrwx--x 1 root dba 2788580 Jan 30 17:01
sys_back-test.log
-rwxr-x--x 1 jhorvath users 4066 Feb 25 12:30 sys_back1.test
I created a mvscript.com and set stick bit on. This gets following
results:
omsa01>more mvscript.com
#!/bin/ksh -x
ACCTEST=/usr/bin
echo "moving $PWD/$1 to $ACCTEST"
cp $PWD/$1 $ACCTEST
exit
omsa01.omsd.census.gov> ./mvscript.com sys_back1.test
+ ACCTEST=/usr/bin
+ echo moving /home/contractors/jhorvath/sys_back1.test to /usr/bin
moving /home/contractors/jhorvath/sys_back1.test to /usr/bin
+ cp /home/contractors/jhorvath/sys_back1.test /usr/bin
cp: /usr/bin/sys_back1.test: Permission denied
+ exit
I thought sticky bit set the user id to the owner of the script upon
execution? Is there another way I could accomplish this?
Thanks,
Received on Wed Feb 25 1998 - 19:55:20 NZDT