A systems administrator must set permissions on a shell script named process_data.sh. The owner must be able to read, write, and execute the script. The group associated with the script must be able to read and execute it. All other users must have no permissions. Which of the following commands will correctly set these permissions?
The correct command is chmod 750 process_data.sh. In octal notation for file permissions:
The first digit represents the owner's permissions. 7 is the sum of read (4), write (2), and execute (1), resulting in rwx.
The second digit represents the group's permissions. 5 is the sum of read (4) and execute (1), resulting in r-x.
The third digit represents permissions for others. 0 means no permissions (---).
The command chmod 754 process_data.sh is incorrect because the 4 grants read permission to others, which violates the requirements. The command chmod u=rwx,g=rx,o=x process_data.sh is incorrect because o=x grants execute permission to others, also violating the requirements. The command chmod 664 process_data.sh is incorrect because it grants read and write permissions (6) but not execute, which is necessary for a script. It also grants read permission (4) to others.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the `chmod` command do in Linux?
Open an interactive chat with Bash
What do the digits in `chmod 750` represent?
Open an interactive chat with Bash
What is the difference between symbolic and octal notation in `chmod`?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access