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 infrastructure architect in Sydney, Australia who refers to himself in the third person. Hi!

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

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.