You are on page 1of 7

11/2/23, 8:38 PM Quiz: User Rights, Programms, and Bash Scripting: Attempt review

Started on Tuesday, 31 October 2023, 4:12 PM


State Finished
Completed on Tuesday, 31 October 2023, 4:25 PM
Time taken 12 mins 56 secs
Marks 22.50/26.00
Grade 2.60 out of 3.00 (86.54%)

Question 1
Correct

Mark 1.00 out of 1.00

Which of the following statements are true?

a. The command chown bob test.txt changes the owner of test.txt to user bob. 

b. The command chown -R bob test_folder makes bob the new owner of test_folder and all its content. 

c. The command chown test.txt bob changes the owner of test.txt to user bob.

d. The command chown alice bob changes the owner of all of bob' files and alice becomes the new owner.

Your answer is correct.

The correct answers are:


The command chown bob test.txt changes the owner of test.txt to user bob. ,

The command chown -R bob test_folder makes bob the new owner of test_folder and all its content.

Question 2
Correct

Mark 1.00 out of 1.00

Which error message appears if the executable flag (x) is not set for a bash script file?

a. Cannot execute

b. No bash script found

c. Permission denied 

d. Invalid script

Your answer is correct.

The correct answer is:


Permission denied

https://moodle.tu-ilmenau.de/mod/quiz/review.php?attempt=1983&cmid=18614 1/7
11/2/23, 8:38 PM Quiz: User Rights, Programms, and Bash Scripting: Attempt review

Question 3

Partially correct

Mark 0.50 out of 1.00

Assume you want to install an application on a Linux machine. Which of the following statements is true?

a. The package manager on Debian is apt.


b. On Linux, software can only be installed via a package manager.

c. aptitude is a package manager shipped with Debian.


d. Installing applications via a package manager is recommended, as the package manager provides additional support, e.g., 
resolves dependencies.

Your answer is partially correct.

You have correctly selected 1.


The correct answers are: Installing applications via a package manager is recommended, as the package manager provides additional support,
e.g., resolves dependencies. , The package manager on Debian is apt.

Question 4
Correct

Mark 1.00 out of 1.00

Which of the following statements are true.

a. The command chmod 600 test.txt changes the permission of the file test.txt to 600. 

b. The command chmod test.txt 600 changes the permission of the file test.txt to 600.

c. The command chmod 755 test_folder changes the permission of the all files in test_folder to 755.

d. The command chmod test_folder 755 changes the permission of the test_folder to 755.

Your answer is correct.

The correct answer is:


The command chmod 600 test.txt changes the permission of the file test.txt to 600.

https://moodle.tu-ilmenau.de/mod/quiz/review.php?attempt=1983&cmid=18614 2/7
11/2/23, 8:38 PM Quiz: User Rights, Programms, and Bash Scripting: Attempt review

Question 5

Correct

Mark 4.00 out of 4.00

File and folder permission are often noted as octal numbers. In the following, fill in the correct octal number for the described file permission.

1) A file that can only be read and modified by the owner: 600 

2) A script file that all the users can read and execute, but only the owner can modify the file: 755 

3) A folder that all users can open and read its content, but only the owner can modify the folder's content: 755 

4) A file that every user can read, but that can only be modified by the owner: 644 

Question 6
Correct

Mark 1.00 out of 1.00

Is the following statement true or false?

"A bash script has to start with #!/bin/bash . Otherwise it cannot be executed.

Select one:

True

False 

The correct answer is 'False'.

Question 7
Correct

Mark 1.00 out of 1.00

Is the following statement true or false?

"A bash script file must have the file ending .sh. Otherwise it its not possible to run the script."

Select one:

True

False 

The correct answer is 'False'.

https://moodle.tu-ilmenau.de/mod/quiz/review.php?attempt=1983&cmid=18614 3/7
11/2/23, 8:38 PM Quiz: User Rights, Programms, and Bash Scripting: Attempt review

Question 8

Partially correct

Mark 1.00 out of 4.00

The user alice can change the own password using the password  command. However, adding and deleting users requires the
root  user. This user can then add new users like bob using the deluser alice  command or delete existing users like alice

using the adduser bob  command.

passwd change_pw superuser admin create alice

cp alice bob remove alice rm alice

Your answer is partially correct.

You have correctly selected 1.


The correct answer is:
The user alice can change the own password using the [passwd] command. However, adding and deleting users requires the [root] user. This
user can then add new users like bob using the [adduser bob] command or delete existing users like alice using the [deluser alice] command.

https://moodle.tu-ilmenau.de/mod/quiz/review.php?attempt=1983&cmid=18614 4/7
11/2/23, 8:38 PM Quiz: User Rights, Programms, and Bash Scripting: Attempt review

Question 9

Correct

Mark 4.00 out of 4.00

Assume you use the command ls -l to list files and folders in a directory. The first column of the output gives information about the type of
object and the permission.

In the following, select the correct permission for each description.

1)
The object is a folder
The owner can open it, read the content, and write to the folder
drwxr-xr-x 
Users from the same group as the owner can open it and read the content
All other users can open it and read the content

2)
The object is a file
The owner can read it and write into the file
-rwxrwx--- 
Users from the same group as the owner can read it and write into the file
All other users cannot read the file, write to the for, or execute it.

3)
The object is a file
-r--r--r-- 
Everyone can read the file

4)
The object is a file
Only the owner can read it -r-------- 

Your answer is correct.

The correct answer is: 1)


The object is a folder
The owner can open it, read the content, and write to the folder
Users from the same group as the owner can open it and read the content
All other users can open it and read the content

→ drwxr-xr-x, 2)
The object is a file
The owner can read it and write into the file
Users from the same group as the owner can read it and write into the file
All other users cannot read the file, write to the for, or execute it.

→ -rwxrwx---, 3)
The object is a file
Everyone can read the file

→ -r--r--r--, 4)
The object is a file
Only the owner can read it

→ -r--------

https://moodle.tu-ilmenau.de/mod/quiz/review.php?attempt=1983&cmid=18614 5/7
11/2/23, 8:38 PM Quiz: User Rights, Programms, and Bash Scripting: Attempt review

Question 10

Correct

Mark 3.00 out of 3.00

File and folder permission can be note using a character representation for a binary representation. In the following map correct binary
representation to the given character representation.

execute (x) 001 

write (w) 010 

read (r) 100 

Your answer is correct.

The correct answer is:


execute (x) → 001,

write (w) → 010,

read (r) → 100

Question 11
Correct

Mark 4.00 out of 4.00

Linux offers several tools to control processes. In the following match the correct commands to the questions.

Which command shuts down a program gracefully? kill


Which command terminates a program immediately? kill -9



ps aux
Which command prints detailed information about all processess on the machine to the console?

Which command can be used to view the resource consumption of the different process in real-time and available top
without installation?

Your answer is correct.

The correct answer is:


Which command shuts down a program gracefully? → kill,

Which command terminates a program immediately? → kill -9,

Which command prints detailed information about all processess on the machine to the console? → ps aux,

Which command can be used to view the resource consumption of the different process in real-time and available without installation? → top

https://moodle.tu-ilmenau.de/mod/quiz/review.php?attempt=1983&cmid=18614 6/7
11/2/23, 8:38 PM Quiz: User Rights, Programms, and Bash Scripting: Attempt review

Question 12

Correct

Mark 1.00 out of 1.00

Which of the following statements is true?

a. The root user can severely damage the operation system, e.g., by deleting system files. 

b. The root user should only be used if necessary, e.g, for installing applications. All others things should be done with the regular 
user account.

c. Switching to the root users can be done by using the su command and the own user password.

d. Switching to the root users can be done by using the su command and the root password. 

e. The root user can access and modify all files, even if the file owner restricted the access using the file permissions. 

Your answer is correct.

The correct answers are:


Switching to the root users can be done by using the su command and the root password. ,

The root user can access and modify all files, even if the file owner restricted the access using the file permissions. ,

The root user can severely damage the operation system, e.g., by deleting system files. ,
The root user should only be used if necessary, e.g, for installing applications. All others things should be done with the regular user account.

Impressum Datenschutz Betriebsregeln

https://moodle.tu-ilmenau.de/mod/quiz/review.php?attempt=1983&cmid=18614 7/7

You might also like