change owner of the file
0 votos
October 2nd, 2006 mysurface Posted in Admin, chown | Hits: 4714 |
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
Live Chat!









Leave a Reply