Linux Symlink chown

This is post is now quite old and the the information it contains may be out of date or innacurate.

If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub

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:


chown -h user:group symlink


Tags: linuxsymlinkchown