[f]chmod in 4.2BSD
N. K. Krishnan
krishnan at hplabs.UUCP
Tue Jul 16 02:28:41 AEST 1985
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.
More information about the Comp.unix.wizards
mailing list