Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!nike!ucbcad!ucbvax!decvax!decwrl!sun!plx!dlb!sheba!stone From: stone@sheba.UUCP Newsgroups: net.micro.att,net.unix Subject: Re: ls permission "l"? Message-ID: <157@sheba.UUCP> Date: Mon, 22-Sep-86 13:29:07 EDT Article-I.D.: sheba.157 Posted: Mon Sep 22 13:29:07 1986 Date-Received: Tue, 23-Sep-86 18:50:25 EDT References: <197@osi3b2.UUCP> Reply-To: stone@sheba.UUCP (David Stone) Organization: Arete Systems,Inc., San Jose, Calif. Lines: 27 Keywords: lockf fcntl locking Xref: mnetor net.micro.att:1489 net.unix:5597 In article <197@osi3b2.UUCP> james@osi3b2.UUCP (James R. Van Artsdalen) writes: >I have access to a 3b2-310 running System V 2.1 (virtual memory version). When >I did an "ls -l /usr/spool/cron/atjobs" I got this: > >total 2 >-r-Sr-lr-- 1 james osi 740 Sep 18 06:14 527490000.a > >Anybody know what the "l" means (or >would mean on a more appropriate file)? This is an artifact of the new file/record locking scheme provided via fcntl(2) and lockf(3). The "l" means that locking done on the file or portions of it will be mandatory locking. There are two types of locking provided, mandatory and advisory. Mandatory locks are obeyed by all processes, while advisory locks are only visible to other processes also using advisory locks. By default all locks are advisory. To make mandatory locks the "Set Group ID" bit needs to be set first on the file. So now the SGID bit has two meanings. Chmod(1) has been changed to disallow chmod s+g on files that are not executable, and to disallow chmod +l (set mandatory locking) on files that are executable. But chmod(2) has not been changed to prevent this. So what you are seeing is ls(1) being confused by seeing the SGID bit set on a file that is not executable. David Stone Arete Systems !sun!arete!stone or {grape,dlb,cdp,hplabs!hpspdla}!sheba!stone