The line to set these permissions would be:
chmod 750 text.txt
Explanation:
- The first number (7) represents the permissions for the owner/user of the file, so 7 in octal means read (4) + write (2) + execute (1) = 4+2+1 = 7.
- The second number (5) represents the permissions for the group, which is read (4) + write (1) = 4+1 = 5.
- The third number (0) represents the permissions for others, which is none.
What is the line to set permissions (using octal numbers) on the "text.txt" file to:
user: read, write, and execute
group: read, write
others: none
1 answer