ls -l obscures important information

kdw1 at sphinx.UUCP kdw1 at sphinx.UUCP
Fri Mar 13 02:43:16 AEST 1987


In <17803 at ucbvax.BERKELEY.EDU> haynes at ucbarpa.Berkeley.EDU (Jim Haynes)
writes:

   I had a maddening problem in which a member of a group could not
   execute a program that was setgid to that group.  After some fuddling
   around I chmoded the program again and suddenly it worked.  Turned
   out that a mistake in a makefile had caused the program to be
   installed originally with mode 2701 - not executable by the group -
   but of course ls -l shows  rwx--s--x   as if all were well.

I don't know what version of Unix you're using (4.[23]?), but System V
(release 2.0 and higher)'s ls would have displayed a capital S in the 
example above to indicate that the execute permission was not set.  I quote
from the man page:

   The indications of set-ID and 1000 bits of the mode are capitalized
   (S and T respectively) if the corresponding execute permission is 
   *not* set.

(I.e., same trick for the sticky bit.)

This saved me from your experience once.  I set-uid a file, did an 
ls -l to check, and that capital S jumped out at me.  All I knew was
I had never seen *that* before, so I checked the manual and discovered
my mistake.

					Keith

-- 
Keith Waclena               BITNET:       xrtkdw1 at uchimvs1.bitnet
University of Chicago         UUCP: ...ihnp4!gargoyle!sphinx!kdw1
Graduate Library School   Internet:   keith at gargoyle.uchicago.edu



More information about the Comp.unix.wizards mailing list