010-160 practice question 2 of 15
Which permissions are set on a regular file once the permissions have been modified with the command chmod 654 file.txt?
Full set: 81 questionsThe chmod command modifies file permissions using octal notation. The number 654 represents three sets of permissions: for the user (owner), the group, and others, respectively. User (owner): 6 is the sum of 4 (read) and 2 (write), resulting in rw-. Group: 5 is the sum of 4 (read) and 1 (execute), resulting in r-x. Others: 4 represents read-only permission, resulting in r--. The question specifies a "regular file," which is represented by a leading hyphen (-) in the permission string. Combining these elements results in -rw-r-xr--.
A. drw-r-xr-- is incorrect because the leading d signifies a directory, not a regular file as specified in the question.
B. d—wxr-x-- is incorrect because it represents a directory (d) and has the wrong permissions for the user owner (--- instead of rw-).
C. –wxr-x--x is incorrect as the user permissions are rwx (7) and other permissions are --x (1), not rw- (6) and r-- (4).
D. –rwxrw---x is incorrect as all three permission sets (user, group, and other) do not correspond to the octal value 654.
1. GNU Coreutils Manual, chmod invocation: "The numeric mode is from one to four octal digits (0-7)... A numeric mode is specified as the sum of one or more of the following values: 4 read, 2 write, 1 execute". This source validates the method of summing octal values to determine permissions.
Reference: GNU Coreutils Manual, Section 27.1 chmod: Change permissions.
2. MIT OpenCourseWare, "The Missing Semester of Your CS Education": In the lecture on Shell Tools and Scripting, file permissions are explained. The course material details how ls -l displays permissions, with the first character indicating the file type (- for a regular file, d for a directory) and subsequent characters representing read (r), write (w), and execute (x) permissions for user, group, and others.
Reference: MIT Missing Semester, Lecture 2: Shell Tools and Scripting, "File Permissions" section (2020).
3. The Linux man-pages project, chmod(1): "A numeric mode is from one to four octal digits... The permissions granted to the user, to the members of the file's group, and to others are specified by the three octal digits." This official manual page confirms the structure and interpretation of octal permission modes.
Reference: chmod(1) Linux manual page, "DESCRIPTION" section.
Keep practicing
Take the free 010-160 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 010-160 practice questions
- Question 1What can be found in the /proc/ directory?
- Question 3Which of the following commands puts the lines of the file data.csv into alphabetical ord…
- Question 4Which of the following programs are web servers? (Choose two.)
- Question 5The file script.sh in the current directory contains the following content: #!/bin/bash e…
- Question 6Reverse DNS assigns hostnames to IP addresses. How is the name of the IP address 198.51.1…
- Question 7The current directory contains the following file: -rw-r—r— 1 root exec 24551 Apr 2 12:36…
