ls -l obscures important information

rjnoe at uniq.UUCP rjnoe at uniq.UUCP
Sat Mar 14 00:39:11 AEST 1987


In article <1264 at sphinx.UChicago.UUCP>, kdw1 at sphinx.UChicago.UUCP (Keith Waclena) writes:
> 
> In <17803 at ucbvax.BERKELEY.EDU> haynes at ucbarpa.Berkeley.EDU (Jim Haynes)
> writes:
>>    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.

That is true of Bell Labs UNIX at least as far back as System III, maybe
further, and up through System V Release 2 (any version).  But in System
V Release 3 that 02701 mode would show up as "rwx--l--x", i.e. 'l' (the
lowercase letter) in place of 'S'.  Also, the chmod(1) command has added
options +l and -l (although the ugo prefixes in this case are meaningless).
This is to permit mandatory locking on the file.  That is, the semantics
of what used to be "set group id but group may not execute" has changed
to "cause locks to be mandatory rather than advisory".  If you then try
to do any chmod on the file that would attempt to set the group-execute
permission (chmod g+x or any superset thereof) you would get the warning
that it's a lockable file and (group) execute permission cannot be set.
Beginning in SVR3 it's impossible to have a file that's set-group-id
yet not executable by the group.
--
"Uniqs System V Release 3 - coming soon to a VAX near you!"
	Roger Noe			ihnp4!uniq!rjnoe
	Uniq Digital Technologies	rjnoe at uniq.UUCP
	28 South Water Street		+1 312 879 1566
	Batavia, Illinois  60510	41:50:56 N.  88:18:35 W.



More information about the Comp.unix.wizards mailing list