Frequently Asked Questions for FreeBSD 2.X : Miscellaneous Questions : Why won't chmod change the permissions on symlinks?
Previous: Yes, but why are there so many different
Next: Why are login names still restricted to 8 characters?

12.4. Why won't chmod change the permissions on symlinks?

You have to use either ``-H'' or ``-L'' together with the ``-R'' option to make this work. See the chmod and symlink man pages for more info.

WARNING the ``-R'' option does a RECURSIVE chmod. Be careful about specifying directories or symlinks to directories to chmod. If you want to change the permissions of a directory referenced by a symlink, use chmod without any options and follow the symlink with a trailing slash (``/''). For example, if ``foo'' is a symlink to directory ``bar'', and you want to change the permissions of ``foo'' (actually ``bar''), you would do something like:

        chmod 555 foo/
      

With the trailing slash, chmod will follow the symlink, ``foo'', to change the permissions of the directory, ``bar''.


Frequently Asked Questions for FreeBSD 2.X : Miscellaneous Questions : Why won't chmod change the permissions on symlinks?
Previous: Yes, but why are there so many different
Next: Why are login names still restricted to 8 characters?