Change ownership of (chown) a symlink

The standard command to change ownership of any file on Linux is chown. However passing this normally with user.group does not change ownership of a symbolic link. To do that, pass the command with the -h flag like in the example below.

chown -h username.groupname symlinkname

Did you find this article useful?