From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,2abcf53b5fea1a69,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-08-29 01:45:57 PST Newsgroups: comp.unix.osf.osf1 Path: bga.com!news.sprintlink.net!redstone.interpath.net!ddsw1!news.kei.com!yeshua.marcam.com!usc!howland.reston.ans.net!agate!msuinfo!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!marlin.jcu.edu.au!coral.cs.jcu.edu.au!stuart From: stuart@coral.cs.jcu.edu.au (Stuart Kemp) Subject: OSF 2.0 problem with chmod on a link Message-ID: Sender: news@marlin.jcu.edu.au (USENET News System) Organization: James Cook University Date: 29 Aug 94 08:17:25 GMT Under OSF 2.0: Changing the perms of a file that is a symbolic link to another file causes nasty things to happen ... mkdir try cd try touch file ln -s file link ls -al total 6 drwx------ 2 stuart staff 512 Aug 29 18:18 . drwxr-xr-x 49 stuart staff 3584 Aug 29 18:18 .. -rw------- 1 stuart staff 0 Aug 29 18:18 file lrwxrwxrwx 1 stuart staff 4 Aug 29 18:18 link -> file chmod g+r link ls -la total 6 drwx------ 2 stuart staff 512 Aug 29 18:18 . drwxr-xr-x 49 stuart staff 3584 Aug 29 18:18 .. -rwxrwxrwx 1 stuart staff 0 Aug 29 18:18 file lrwxrwxrwx 1 stuart staff 4 Aug 29 18:18 link -> file When determining the new perms for the file, chmod has used the existing perms from the "link" entry instead of the "file" entry. Can see this by doing a chmod g-r link above instead, which yields: total 6 drwx------ 2 stuart staff 512 Aug 29 18:25 . drwxr-xr-x 49 stuart staff 3584 Aug 29 18:25 .. -rwx-wxrwx 1 stuart staff 0 Aug 29 18:26 file lrwxrwxrwx 1 stuart staff 4 Aug 29 18:25 link -> file -SRK -- Dept of Computer Science Internet: stuart@cs.jcu.edu.au James Cook University Townsville Tel: +61 77 814992 Qld 4811 Australia FAX: +61 77 814029