A user changed the permissions of a script (myscript.sh) in a shared directory. The user is curious why everyone can execute the script if the user owns the script and everyone else only has read access. To make the script executable, what command did the user mistakenly issue?

A. chmod +x myscript.sh
B. chmod +r myscript.sh
C. chmod +w myscript.sh
D. chown root myscript.sh


Answer: A. chmod +x myscript.sh
chmod +x myscript.sh —The permissions changed to rwxrwxr-x or 775, which gives everyone execute permission. To limit execute permission to the user and group only, the command should have been: chmod ug+x myscript.sh

Computer Science & Information Technology

You might also like to view...

The ________ of the group is equal to the number of elements in the group.

A) ?order B) ?generator C) ?modulus? D) ?integral divisor

Computer Science & Information Technology

For a macro shortcut key, which of the following is used before the letter?

A) CTRL B) Home C) SHIFT D) ALT

Computer Science & Information Technology

What are the four phases of compilation?

What will be an ideal response?

Computer Science & Information Technology

If the txtPrice control contains the value 75, what value will the Decimal.TryParse(txtPrice.Text, decPrice) method return? (t/f)

a. true b. false

Computer Science & Information Technology