about Grigoris Maravelias
Changing file ownership

Changing file ownership

These are two commands to help us change the ownership of files, but we must be in the root or su mode first.

> chown <username> <file/folder> : used to change the owner of a file or folder

> chgrp <group> <file/folder> : used to change the group of a file or folder

> chown <username>.<group> <file/folder> : used to change the owner and the group in one step

> chown -R <username>.<group> <folder> : used to change the owner and the group of ALL files and directories under the parent <folder> (a very useful command !!)

(thanks to this post!)

Leave a Reply

Your email address will not be published. Required fields are marked *