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 owner of symbolic link - symbolic link change owner - how to change owner of symbolic link - change symlink owner - change ownership of symbolic link - change group symbolic link - change owner symbolic link - change symbolic link owner - changing ownership of a symbolic link - linux change link owner - change owner on symbolic link - linux symbolic link change owner - how to change ownership of symbolic link - change symbolic link group - changing owner of symbolic links - aix change group - change link owner - solaris symbolic link change owner - symbolic link how to change the owner - change owner directory linux symbolic link - change owner sym link - change group in unix - how to change the owner for symble link - change owner on symlink - change owner of a link - how to change the ownwrship to link in unix - symbolic link owner - change owner of link - change symlink permission - linux change owner symbolic link - symbolic link change group - change owner of a symbolic link in solaris - change owner soft link - change ownership of a link linux - change the owner of a soft link - change symlink user and group - change the qwner of link in unix - change permissions on symbolic link linux - change symlink ownership - change the owner of a symbolic link - change ownership of a unix link - change ownership symbolic link linux - change ownership of symlink - change link ownership - chaging groups and owner in unix - change group of symbolic link linux - changing owner of link unix - change owner linux symbolic links - change permissions on link linux - change the ownership of a symlink -