Date: Fri, 07 Apr 2000 17:14:49 -0700 From: Suresh Bhushan <sbhushan@smartshop.com> To: doc@FreeBSD.org Cc: surbush@hotmail.com Subject: Answer to the point Message-ID: <38EE79F9.4C9AF506@smartshop.com>
next in thread | raw e-mail | index | archive | help
Sir Doc, This answer is 'beating around the bush'. I had to get the exact anser from deja.com. Please update this. In http://www.freebsd.org/FAQ/misc.html#AEN3837, the question is : -------------------------------------- >Q: Why won't chmod change the permissions on symlinks? > >A: 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. Man page for chmod gives -H If the -R option is specified, symbolic links on the command line are followed. (Symbolic links encountered in the tree traversal are not followed.) -L If the -R option is specified, all symbolic links are followed. hey, question is not for recursion or for follow-links. >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/ Once again, hey, question is about change of permissions of 'foo' not 'bar'!!! Why can't this be simply be written as "not possible" as "system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used." >With the trailing slash, chmod will follow the symlink, ``foo'', to change the >permissions of the directory, ``bar''. ---------------- Doc, ANWSER TO THE POINT. -Suresh. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38EE79F9.4C9AF506>