[an error occurred while processing this directive] Frequently Asked Questions for FreeBSD 2.X : Miscellaneous Questions : Hey! Chmod doesn't change the file permissions of symlinked files! What's going on?
Previous: Miscellaneous Questions
Next: How do I mount a CDROM? I've tried using mount(8), but it keeps on giving me an error like, ``/dev/cd0a on /mnt: Incorrect super block.''

7.1. Hey! Chmod doesn't change the file permissions of symlinked files! What's going on?

You have to use either ``-H'' or ``-L'' together with the ``-R'' option to make this work. See the chmod(1) and symlink(7) 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(1) 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 : Hey! Chmod doesn't change the file permissions of symlinked files! What's going on?
Previous: Miscellaneous Questions
Next: How do I mount a CDROM? I've tried using mount(8), but it keeps on giving me an error like, ``/dev/cd0a on /mnt: Incorrect super block.'' [an error occurred while processing this directive]