The correct answer is C. chmod.
chgrp changes the group ownership of a file.
chown changes the owner of a file.
chusr is not a valid command.
chmod is used to change the permissions of a file. The permissions are read, write, and execute, and they can be set for the owner, group, and others. The permissions are represented by three octal digits, one for each category. The digits can be 0, 1, or 2, and they have the following meanings:
- 0 = no permission
- 1 = read permission
- 2 = write permission
- 3 = execute permission
For example, the permission 755 means that the owner has read, write, and execute permissions, the group has read and execute permissions, and others have read permission.
To change the permissions of a file, use the following syntax:
chmod [ugoa][+-=][perms] filename
The ugoa
part specifies which users you want to change the permissions for. The options are:
- u = owner
- g = group
- o = others
- a = all
The perms
part specifies the permissions you want to change. The options are:
- r = read permission
- w = write permission
- x = execute permission
The +
sign means to add the permission, the -
sign means to remove the permission, and the =
sign means to set the permission.
For example, to give the owner of a file read and write permissions, you would use the following command:
chmod u+rw filename
To give the group of a file read and execute permissions, you would use the following command:
chmod g+rx filename
To give everyone read permission to a file, you would use the following command:
chmod a+r filename