From: stuart@coral.cs.jcu.edu.au (Stuart Kemp)
Subject: OSF 2.0 problem with chmod on a link
Date: 29 Aug 94 08:17:25 GMT [thread overview]
Message-ID: <stuart.778148245@coral> (raw)
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
next reply other threads:[~1994-08-29 8:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-08-29 8:17 Stuart Kemp [this message]
1994-09-01 6:50 ` OSF 2.0 problem with chmod on a link Burkhard Neidecker-Lutz
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox