How to tell chmod to follow symbolic links?
chown
has an option -L
which tells chown
to traverse symbolic links. It seems this option is missing for chmod
. Any idea how to tell chmod
to follow symlinks as well?
EDIT: I'm on Debian.
For Linux/GNU see the second paragraph of the info page also on the Web, emphasis added:
chmod never changes the permissions of symbolic links, since the chmod system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permissions of the pointed-to file. In contrast, chmod ignores symbolic links encountered during recursive directory traversals.