In Linux operating system, we can have users and collection of users as a group. When the user account is created by default the user will be in a group. We can have a group of users to share the common properties. When a file is created, the author the file will be the owner of the file. In terms to provide the security to the file, the Linux provides the file permissions like read, write and executable. According to the requirements, the owner can change the permissions to the users.
Chgrp command is used to change the group associated with a file or folder from one group to another in Linux.
Syntax :
Chgrp [ username ] [file / directory name ]
Options of the command
Options of the command
- -c : describe the action for each file
- -f : it wouldn’t print the error to those files whose group cannot change.
- -r : re cursively change the group ownership of directories and their files.
$ chgrp admin1 /user/admin
Changes the group ownership to admin1 from admin.
0 comments:
Post a Comment