Changing the owner of a symlink


I’ve decided to start a new post series: Ruben relearns obvious *nix things. Today, we try changing the owner of a symlink, fail, then realise we forgot to use the “-h” flag.

Trying to change the owner of a symlink this way doesn’t work:

# chown userX:groupX link

Now we use the -h flag:

# chown -h userX:groupX link

Now when we list:

# [permissions] userX userY [date] link

This works on FreeBSD and GNU. Thank you for your time.

Author bio and support


Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!