change owner of the file

October 2nd, 2006 mysurface Posted in Admin, chown | Hits: 52941 | 6 Comments »

chown is a simple admin command that use to change the owner and groups on specified file. The simple syntax looks like bellow:

chown OWNER:GROUP FILE…

For example I want to change owner and group of file /var/www/html/index.php from root to apache.

chown apache:apache /var/www/html/index.php

You need to have root privilege to do that.

Sometimes you want to change the entire directory including its sub dir and files, you can specified -R (Recursive) option.

For example, I want to change owner and group of directory /var/www/html/blog from root to apache.

chown -R apache:apache /var/www/html/blog

6 Responses to “change owner of the file”

  1. Nice post, are you seling links from your website? I’m interested…

  2. Thanks a whole lot for offering people who have such a marvellous possible opportunity to examine ideas out of this blog. It’s generally extremely best as well as filled with a great time personally as well as my own office partners to visit your web site specifically 3 x each week to review the new items you possess. Not only that, we have been undoubtedly satisfied regarding the great information you give. Picked a couple of tips on this site are really the best That i’ve ever acquired.

  3. – Appropriate for informal, style, streetwear style.

  4. When someone writes an article he/she maintains the image
    of a user in his/her mind that how a user can be aware of
    it. So that’s why this paragraph is great.

    Thanks!

  5. If some one needs to be updated with most recent technologies therefore he must be visit this site and be up to
    date daily.

  6. Gill James Says:

    We can not aid commenting listed here. Give thanks to
    a person pro tempore perfectly devoted reviewing this content.
    I can not always remember the last moment I’ve bookmarked just about anything.
    Perhaps it was actually https://restoringallthings.org, and your materials will
    be no much less great. Greatest wants, keep publishing much more!

Leave a Reply