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
Related Articles
- How to Make or Create Symbolic Link in Unix or Linux
- Create Symbolic Links, Hard Links and Directory Junctions in Vista with MKLINK
- How to Change or Spoof MAC Address in Windows XP, Vista, Server 2003/2008, Mac OS X, Unix and Linux
- (Enhance) Concurrent Capable and Big vg Format Volume Group in AIX Unix
- Refresh Linux or Unix Path Environmental Variables with rehash
- How to Calculate and Generate MD5 Hash Value in Linux and Unix with md5sum
- How to Mount USB Disk Drive in UNIX or Linux
- How to Disable Linux and Unix Cron Jobs (Crontab) Email Sending
- Change User Name on Linux
- Add Take Ownership Option To Files and Folders Context Menu in Vista










































January 17th, 2009 08:34
Thanks for the tip. I was always frustrated by not being able to change the ownership of symlinks. Definitely good to know.