Permission Question
    John Navarra 
    navarra at casbah.acns.nwu.edu
       
    Sun Mar 10 07:29:43 AEST 1991
    
    
  
   I am running SunOS and I was wondering about the following:
ls -lasd  /somedir on my machine:
  20 drwxrwsrwt   2 daemon   staff       9728 Mar  9 12:37 /some dir
 Now you see that this dir has its sgid bit on which means (if I remember 
 correctly) that when you make a file in this dir, it is given the same
 guid. Let's see:
 vi somefile
 ls -las | grep somefile:
   2 -rw-------   1 navarra  staff          2 Mar  9 12:41 somefile
 id:
 groups=20(users)
 I am not a member of staff but I wanted to see if I could do the following:
 cp /bin/sh /somedir/sh
 chmod g+s /sh
 ls -las | grep sh
 
 224 -rwx--x--x   1 navarra  staff     106496 Mar  9 13:18 sh
 AS you see I was not able to set this bit. I was wondering if you actually
 have to be a member of the group to set its bit? Is this true on all Unix
 systems?
 From the Lab of the MaD SCiEntIsT:
 navarra at casbaha.acns.nwu.edu
  
    
    
More information about the Comp.unix.misc
mailing list