Our blog

 

Linux Symlink chown

If you create a symlink via SSH then chances are you are logged in as the root user and the symlink will be created as root. Usually though you will want to the symlink to belong to another owner:group.

If you try to use chown it will silently fail to change the ownership of the symlink, though instead it will change the ownership of the file the symlink is pointing to.

If you want to make it actually change the owner:group of the symlink, us the switch -h.

For example:

CODE:
  1. chown -h user:group symlink

More...

More Reading:

2 Comments

[...] thanks to the Edmonds Commerce Blog, a Freelance PHP Ecommerce and SEO Developer in the UK for their post explaining this.  Although, if I had just man’ed chown, I would have been able to figure this out on my own [...]

 

Ben Leivian
January 29th, 2010

Just what I was looking for, thanks!

 

 

Leave a Reply