Explanation: Permissions involve read, write, and execute roles that can be assigned to the owner, a group, or other users1.To use the chmod command, you must specify the permission you want to set and the file or directory you want to modify1.For example,chmod +rwx filenameto add permissions,chmod -rwx directorynameto remove permissions, orchmod +x filenameto allow executable permissions2.
There are two ways to specify the permissions with the chmod command: symbolic notation and numeric notation1.Symbolic notation uses letters and symbols to represent the user classes and the permissions1.Numeric notation uses octal numbers (0-7) to represent the permissions for each user class1.Each octal digit corresponds to a combination of read ®, write (w), and execute (x) permissions, as shown in the table below3:
Octal digit
Binary representation
Permissions
0
000
—
1
001
–x
2
010
-w-
3
011
-wx
4
100
r–
5
101
r-x
6
110
rw-
7
111
rwx
To use numeric notation, you need to provide three octal digits, one for each user class (owner, group, and others)1.For example,chmod 644 filenamemeans that the owner has read and write permissions (6), the group has read permissions (4), and others have read permissions (4)1.
In this question, the desired permission for the file text.txt is 750, which means that the owner has read, write, and execute permissions (7), the group has read and execute permissions (5), and others have no permissions (0)1. Therefore, the correct chmod command to change the permission of the file text.txt to 750 ischmod text.txt 750.
References:1: Chmod Command in Linux (File Permissions) | Linuxize2: How to change directory permissions in Linux | Pluralsight3: How to Use the chmod Command on Linux - How-To Geek