From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,1b9de6598a696782,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1995-01-04 08:19:53 PST Newsgroups: comp.unix.osf.osf1 Path: nntp.gmd.de!Germany.EU.net!howland.reston.ans.net!cs.utexas.edu!utnut!info.physics.utoronto.ca!sysmark From: sysmark@helios.physics.utoronto.ca (Mark Bartelt) Subject: chmod(1) bug [OSF/1 V3.0] Message-ID: Nntp-Posting-Host: helios.physics.utoronto.ca Sender: news@info.physics.utoronto.ca (System Administrator) Reply-To: mark@cita.toronto.edu Organization: Canadian Institute for Theoretical Astrophysics Date: Wed, 4 Jan 1995 16:19:53 GMT Take a look at the following: opossum> ls -l total 1 lrwxrwxrwx 1 bozo system 3 Jan 4 10:49 bar -> foo -rw-rw-r-- 1 bozo system 4 Jan 4 10:49 foo opossum> opossum> chmod g-w bar opossum> opossum> ls -l total 1 lrwxrwxrwx 1 bozo system 3 Jan 4 10:49 bar -> foo -rwxr-xrwx 1 bozo system 4 Jan 4 10:49 foo ^ ^ ^^ !!!!!!! It looks as if chmod(1) is picking up the mode of the symlink itself (rather than the mode of the file to which the symlink points) to use as the value in which to {set,clear} bits to produce the new mode that gets assigned to the target file. PS: Different (though related) question ... Is there any way to set the mode which gets assigned to symlinks? Yeah, I *know* the mode of a symlink is irrelevant (well, except for bugs like the one reported above ;-), but IRIX gives them mode 0000, which makes them stand out a bit more nicely in a "ls -l" listing than does OSF/1's (and SunOS's) mode 0777. (Didn't OSF/1 V1.x make them mode 0755?) Mark Bartelt 416/978-5619 Canadian Institute for mark@cita.toronto.edu Theoretical Astrophysics mark@cita.utoronto.ca "Clothes not busy being worn are busy drying." - Dylan, on laundry day [ singing "It's all right, ma (I'm only bleaching)" ]