From: lpostenr@pyramid.com (Linda Postenrieder)
Newsgroups: comp.sys.pyramid
Subject: Re: Weird problems with groups on Pyramid
Date: 13 Apr 92 15:46:23 GMT
Organization: Pyramid Technology

In article <1875@wrdis01.af.mil> jshumate@wrdis01.af.mil (Shumate Jason) writes:
>In article <1992Apr10.002350.8709@pta.pyramid.com.au>, bob@pta.pyramid.com.au (Bob Vernon) writes:
>> In article <1872@wrdis01.af.mil> jshumate@wrdis01.af.mil (Shumate Jason) writes:
>> >I have been having some really weird problems with groups on Pyramid.  Let
>> >me explain.  I have a program that I want to run as setgid so that everyone
>> >in the group can have the permissions belonging to the owner.  Let's
>> >call my program "test" and say we have a group called "mygroup" that 
>> >is in /etc/groups that contains Mary, Joe, Jason.  The directory "test" is
>> >in has a permission of 777 all the way up the directory tree, so anyone
>> >on the system can reach it.  The directory looks like this:
>> >
>> >-rwxr-s---   Joe   mygroup   2000 test*
>
>[ deletions ]
>
>> >                                 Well, on my box, Joe can execute test,
>> >Jason can execute test, but Mary can't.  Absolute pathnames were used, and
>> >the  C-shell command "groups" shows Mary as being in the group, yet she
>> >can not execute test!
>> 
>The error message is "cannot execute".  Permission
>is denied to user "Mary" although she is indeed in the group that owns
>both the file and directory.  I should add that I received a suggestion to
>try -rwsr-x--- on the program.  I tried this, but I still have the same
>problem.
>
>> So I'll just list all the problems with the above that you may having
>> (from least likely to most likely).
>> 
>> 1.  Is the name of your program really test?  There is a standard unix
>
>What a blunder on my part!  I was trying to be generic, and of course in
>my posting I use a bad choice for a name.  Actually, the program is called
>"ddss016a".  I don't know why I said "test".  Maybe something like "myprog"
>would have been much better.
>
>[ deletions ]
>
>> 2.  Is test a shell script?  If Joe and Jason are in a different
>> universe from Mary or use a different shell then it may be that a
>> different shell program is used to execute the script.  This will cause
>> differences in the way it executes.  You can usually force a script to
>
>Well the program in question is a binary that is called from a shell
>script.  The user can execute the shell script, but not the program
>that is called from it.  The problem is the binary program.  I can log in
>as the user and attempt to run the binary by bypassing the shell script and
>I still get "permission denied".  The shell script is NOT setuid or setgrp,
>by the way.  
>

Is Mary using a different shell in the ucb universe?

This sounds like the secure shell at work.  Try running 'what /bin/csh'
(or whatever shell Mary is using).  In 5.1 (I'm not sure of 5.0d) there
is a secure shell which does not allow suid.  You will see something
like:

$  what /bin/sh
/bin/sh:
        main.c  4.2 8/11/83     (enhanced security version)
        args.c  4.2 8/11/83
        blok.c  4.2 8/11/83
        builtin.c       4.2 8/11/83
        cmd.c   4.2 8/11/83
[ deletions ]

If Mary is running the secure shell, you may want to exec a standard
shell and have her rerun the shell (look in /usr/adm for the standard 
versions).

$  ls -l /usr/adm/*sh*
-rwxr-xr-x  1 bin        108544 Dec  3  1990 /usr/adm/csh.bck*
-rwxr-xr-x  1 bin        108544 Dec  3  1990 /usr/adm/csh.sec*
-rwxr-xr-x  1 root       172032 Jan 15  1991 /usr/adm/ksh.bck*
-rwxr-xr-x  1 root       172032 May  7  1991 /usr/adm/ksh.bck.ucb*
-rwxr-xr-x  1 root       172032 Jan 15  1991 /usr/adm/ksh.sec*
-rwxr-xr-x  1 root       172032 May  7  1991 /usr/adm/ksh.sec.ucb*
-r--r--r--  1 bin         71680 Jul 11  1990 /usr/adm/sh.sec
-r--r--r--  1 bin         36864 Mar 25  1991 /usr/adm/sh.sec.ucb
-rwxr-xr-x  1 bin        118784 Dec  3  1990 /usr/adm/tcsh.bck*
-rwxr-xr-x  1 bin        118784 Dec  3  1990 /usr/adm/tcsh.sec*

$ what /usr/adm/csh.bck
/usr/adm/csh.bck:
        csh:sh.c        $Revision: 1.3 $        (standard version)
        csh:doprnt.S    $Revision: 1.3 $
        csh:alloc.c     $Revision: 1.2 $

[ deletions ]

Hope this helps.
Linda
Newsgroups: comp.sys.palmtops