:::: MENU ::::

Change ownership (chown) on a symbolic link

  • Jun 14 / 2017
  • 0
Linux

Change ownership (chown) on a symbolic link

You already probably noticed that if you want to update the ownership of a symbolic link on any UNIX system, a simple chown won’t do the job.

Indeed, let’s suppose you have this:

If you’re doing a simple chown:

You can see that it changes the ownership on the target file and not on the symbolic link:

If you want to update the symbolic link, you need to use the -h or –no-dereference option to apply the changes on the symbolic link and not on the target:

Then, you can see that it’s now updated:

Share...Share on Google+Tweet about this on TwitterShare on RedditShare on LinkedInShare on FacebookEmail this to someone

Comments are closed.

Question ? Contact