Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!cornell!uw-beaver!rice!sun-spots-request From: gandalf@csli.stanford.edu (Juergen Wagner) Newsgroups: comp.sys.sun Subject: possible chgrp(1) bug? Message-ID: <2318@kalliope.rice.edu> Date: 14 Dec 88 14:19:30 GMT Sender: usenet@rice.edu Organization: Rice University, Houston, Texas Lines: 43 Approved: Sun-Spots@rice.edu Original-Date: Fri, 2 Dec 88 13:32:57 PST X-Sun-Spots-Digest: Volume 7, Issue 53, message 4 of 12 The manual page for chgrp(1) says: [SunOS 4.0] chgrp changes the group-ID of the filenames given as argu- ments to group. ... -R Recursive. chgrp descends through the directory, and any subdirectories, setting the specified group-ID as it proceeds. When symbolic links are encountered, their group is changed, but they are not traversed. The manual page for chmod(1) says: [SunOS 4.0] Change the permissions (mode) of a file or files. Only the owner of a file (or the super-user) may change its mode. ... -R Recursively descend through directory arguments, set- ting the mode for each file as described above. When symbolic links are encountered, their mode is not changed and they are not traversed. Now, try the following: peano:work(17). touch x peano:work(18). ln -s x y peano:work(19). ls -lg x y -rw-r--r-- 1 wagner parc 0 Dec 2 13:29 x lrwxrwxrwx 1 wagner parc 1 Dec 2 13:29 y -> x peano:work(20). chgrp kmem y peano:work(21). chmod 770 y peano:work(22). ls -lg x y -rwxrwx--- 1 wagner parc 0 Dec 2 13:29 x lrwxrwxrwx 1 wagner kmem 1 Dec 2 13:29 y -> x peano:work(23). This shows that chmod changes the protection of the file (as it should), but chgrp changes the group of the link (shouldn't it change the file's group?). [[ Well, perhaps it should, but what does that have to do with the -R option? --wnl ]] Juergen Wagner gandalf@csli.stanford.edu wagner@arisia.xerox.com