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.

New Articles

Incoming Search Terms for the Article

change owner of symbolic link - change ownership symbolic link - change owner symbolic link - change ownership of symbolic link - linux change symbolic link owner - changing ownership of symbolic link - change symlink owner - how to change owner group fedora - linux change owner symbolic link - change owner of sym link - set permission under symbolic link in linux - unix symbolic link permissions - change the owner of a symbolic link - change owner soft link - change symbolic link owner - change permission on link unix - aix change group - linux change permission on link - linux change symlink ownership - linux change permission of symlink - linux change soft links owner - unix modify a link group owner - change group owner of symbolic link - change ownership of a link - change group of symbolic link - change owner of linked file - change owner link linux - changing owner of symlink - change the group of a link - change ownership of link in unix - change owner symbolic link linux - how to change owner link - how to change ownership of symlink - linux change owner volume group - linux change ownership volume group - linux change owner of symbolic link - linux change symbolic link group - solaris howto change group for links - solaris change owner command - symbolic link owner group - unix change ownership of symbolic - unix change file ownership of symbolic - change linux symlink owner - changing ownership of a symbolic link - change ownership of a link solaris - change owner link - change user symlink - change ownership link - changing permissions on symbolic link - linux change symbolic link permissions -