Change Group Ownership of Symbolic Links in Unix or Linux

»»»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, CentOS, Red Hat Enterprise Linux, Ubuntu, Debian 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

By |2016-12-25T14:21:42+00:00December 25th, 2016|Categories: Linux|Tags: , |4 Comments

About the Author:

LK is a technology writer for Tech Journey with background of system and network administrator. He has be documenting his experiences in digital and technology world for over 15 years.Connect with LK through Tech Journey on Facebook, Twitter or Google+.