chown is a Unix/Linux command for changing files and folders ownership.chown become really handy if you want to change the owner for many files or folders using the command line.
As long as you have multiple user accounts available in your system along with your root account, you can the ownership of files and folders between user account, in case you want to make a certain user and group has the privileges of read, write or both in this file or folder.
Check the earlier post for changing files and folders permissions using the command line chmod Here.
[How To]: Check the current files and folders permissions and ownership
There are many different types of listing files and folders can help you to check many information about your files and folder you are currently navigating, such as modified date/time, file size, current owner, associated group, and more.
In this case we will use this command
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
[How To]: change The File or The Folder ownership
In the first screenshot we see many files and folders listed with owner name called “linuxnov”, so here how we are going to change “install.php” file to root owner for example
Now run list command again for viewing your progress.
[How To]: change The File or The Folder ownership and groups
We will use the same command we used earlier for in step 2 and will add a colon followed by the group name.
[How To]: change ownership for a folder and all sub directories and files beneath it
So this will change all files and folder beneath folder called modules to the ownership called root.
That’s it for now.