Using symbolic mode and changing no other permission bits, type the command that adds the execute permission for all three permission classes (user, group and other) to the file backup.sh in the current directory.

LPIC-1 Exam 102-500, objective 105. Shells and shell scripting easy

Machine-checked — no person has signed for it. This question was read against the source cited below by an automated pass, which found no contradiction. That is a weaker claim than it sounds: the same kind of process wrote the question, so it can confirm its own mistake.

Treat it as a good draft rather than as settled fact, and read the source below before you rely on it. It is not used in mock exams here — only questions a person has signed for are.

How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.

Answer

Type the answer.

Accepted answers

Case sensitive — Linux is, and grading LS as ls would teach a falsehood.

Why

Symbolic mode is WHO OPERATOR PERMISSION: `u`, `g`, `o` or `a` for who, `+`, `-` or `=` for the operator. `chmod +x file` with no who behaves like `a+x` except that bits set in the umask are left alone, whereas `a+x` sets all three unconditionally; `u+x` would grant execute to the owner only. Numeric mode such as `chmod 755` would also work but replaces every permission bit rather than adding one. Without the execute bit, `./backup.sh` fails with permission denied, although `bash backup.sh` still runs it because there bash, not the kernel, opens the file.

Where this comes from

Cited
LPI exam objective 105.2
What it says
Make a script executable.

Practise this

Reading one question is not practice. The trainer will draw a short set from objective 105 and space the ones you get wrong.

Practise LPIC-1 Exam 102-500

More questions on this objective

All questions on Shells and shell scripting

Practise LPIC-1 Exam 102-500