krishnan@hplabs.UUCP (N. K. Krishnan) (07/15/85)
chmod(1) of a symbolic link changes the mode of the target of the symbolic link. This is beacuse chmod(2) follows symbolic links. Is there any problem with chmod(2) not following symbolic links? If chmod(2) does not follow symbolic links it could be similar to [f]chown(2). To change mode of the symbolic link one could use chmod(name,mode); To change the mode of the target one could use fchmod(open(name,openmode),mode); All of this done with appropriate checking, of course.
mp@allegra.UUCP (Mark Plotnick) (07/16/85)
Don't worry about it. The modes on symbolic links don't make a bit of difference anyway. Neither do the group and owner, unless you're interested in file space accounting.
simsong@mit-eddie.UUCP (Simson L. Garfinkel) (07/16/85)
It appears that the utimes(2) call chases symbolic links rather than modifying the time of the link itself. In the man page, one of the errors returnable is "[ELOOP]" -- "Too many symbolic links were encountered in translating the pathname." So how do you change the times of a symbolic link?