Change Group Ownership of Symbolic Links in Unix or Linux

chgrp can be used to change group ownership of files and directories in almost all UNIX-variant platforms, including Linux such as Fedora Core, Ubunto and etc. However, if you try to change the group membership of a symbolic link, the group ownership of its referenced or linked file is changed instead.

This is the default behavior of chgrp command, where dereference option is used by default so that all changes will affect the referent of each symbolic link, rather than the symbolic link itself.

To change the group ownership of symbolic link, simply use the -h or –no-dereference flag to the chgrp command.

Example:

chgrp -h new_group symbolic_link_name


One Response to “Change Group Ownership of Symbolic Links in Unix or Linux”

  1. Lars
    January 17th, 2009 08:34
    1

    Thanks for the tip. I was always frustrated by not being able to change the ownership of symlinks. Definitely good to know.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.
Custom Search

New Articles

Incoming Search Terms for the Article

change ownership of symbolic link - change owner symbolic link - change owner of symbolic link - aix change group - change symbolic link owner - linux change owner of symbolic link - change symlink owner - changing owner of symlink - change owner of link - linux change link owner - change group symbolic link - symbolic link change owner - changing ownership of a symbolic link - change symbolic link group - how to change owner of symbolic link - linux change owner symbolic link - change link owner - symbolic link ownership - symbolic link owner - change owner symlink - changing owner of symbolic links - change owner link unix - solaris symbolic link change owner - change owner of symlink - symbolic link how to change the owner - linux change owner of link - Symlink Ownern - change owner links - change ownership symlink - change owner link linux - change symlink ownership - change ownership symbolic link solaris - changing ownership of symbolic link - change owner on symlink - change symlink permission - symbolic link change group - change owner of a symbolic link in solaris - change owner soft link - how to change ownership of symbolic link - change ownership of a link linux - change permissions on symbolic link - change the owner of a soft link - change symlink user and group - change the qwner of link in unix - unix change group - change permissions symbolic link - how to chage linux link owner - how to change owner of a +symbolic name on linux? - change ownership symbolic link - change ownership of symlink -