User account menu

  • Log in
BXTra.net

Breadcrumb

  • Home
  • Articles
  • Change Owner of Symlink in Linux

Change Owner of Symlink in Linux

By BXTra | 9:43 PM PDT, Mon July 25, 2011
CentOS

When you use chown to change ownership of a file or directory, it will work but with Symlink (Created by using ln command), you can't do that. When you do it, it will fail and you may not know that since there is no error message or anything to let you know. So, to change ownership for Symlink, you need to use option -h. Below is an example :

chown -h user:group symlink

Be careful when you use it with directory. Not to have trailing slash (/) at the end or it won't work. So, if you have a Symlink directory name munin What you have to do is :

chown -h root:root /var/www/munin

not

chown -h root:root /var/www/munin/
About text formats
  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.

  • Will the router get the Openvpn as a client option?
    6 years ago
  • cancellation
    6 years 1 month ago
  • Router ASUS RT-N12 D1 tomatoes passwort falsch
    7 years 8 months ago
  • WPS button = 30/30/30 hard reset button
    7 years 9 months ago
  • Save my day!
    8 years 3 months ago
  • How to
    8 years 6 months ago
  • Can i still access my modem (the one with the ISP provided)?
    8 years 6 months ago
  • A saving step!
    8 years 10 months ago
  • Problem with Asus n12e-c1
    9 years ago
  • don't use Hostgator
    9 years 2 months ago

© 2007 - 2023 BXTra.net. All Rights Reserved. 
Certain other content, photos and artwork displayed on BXTra.net are protected by copyright and are the property of their respective owners.

Privacy Policy