File Systems
An executable file has the SetUID permission set and it is owned by root. If this file is run on the system by a guest user, which privilege will the program run at? The user who ran the file becomes the file's permanent owner. The user who created the file remains the owner. The program will run at root privilege. The root user becomes the file's owner.
The program will run at root privilege.
If you use the command chmod u+x filename, what change will you be making to the file named "filename"? gives everyone execute permission to filename results in syntax error gives the user write permission to the file give execute permission for the user irrespective of anything else
give execute permission for the user irrespective of anything else
What three letter command would list the absolute path of the current directory? pwd cat man vim
pwd
You've been given a script that uses the awk command repeatedly. To ensure the script runs consistently across different systems, you want to replace all instances of awk with its full pathname. Even if you never used awk before, how can you determine the absolute path of the awk command in a Unix/Linux environment? where awk how awk which awk who awk
which awk
I ran the command touch file with spaces Please enter the number of files created: 2 4 3 1
3
Which of the following is not an essential part of a file system? A tree-like organizational structure A namespace A disk drive A security model
A disk drive
You've been given a task on a Linux server to adjust some file permissions. In which of the following scenarios would you primarily use the chmod command? You need to view the current permissions of a file. You want to change the owner of a file from one user to another. You wish to modify the group ownership of a directory. A script should be made executable so it can be run as a program.
A script should be made executable so it can be run as a program.
Assess the impact of using the rm -f * command in your home directory. What precautions should be taken before executing this command? Limit the scope by using specific files and directories instead of using a wildcard All of these Avoid using -f unless necessary Double-check what you are doing. Before executing any rm command ensure that you are in the correct directory by using the pwd command
All of these
What is the primary purpose of the chmod command in Linux? Modifies the character map used by the system Changes the permissions on a file Modifies the central homepath of the user Loads a character based device module
Changes the permissions on a file
Analyze the permissions of the file "employees.odt" with mode -rw-r--r--. What operations can the user mhuffman, who is not the owner but belongs to the file's group, perform? He can run the file if it's an executable. He can change ownership of the file. He can open the file, make changes, and save the file. He can open the file and view its contents, but he can't save any changes.
He can open the file and view its contents, but he can't save any changes.
A user has executed the command mkdir -p cars/chevy/impala. What will this do? It will make a single directory with spaces in the name "cars chevy impala" It will not make any directories but give and error: mkdir: cars/chevy: No such file or directory It will make a directory called cars, a directory under cars called chevy, and a directory under chevy called impala It will make 3 directories in my current directory called cars, chevy, and impala.
It will make a directory called cars, a directory under cars called chevy, and a directory under chevy called impala
The command "cd ../../.." does what? Navigate back to where I issued the command Move 3 directors down the tree Error permission denied. Move 3 directories up the tree
Move 3 directories up the tree
Jane has set the sticky bit on a directory called sharedDocs. Analyze the impact of this setting on the files within that directory. Files within the directory can be executed, but not read or written to. All files in the directory are automatically encrypted. Any user can delete any file in the directory. Only the owner of a file can delete or modify their own file.
Only the owner of a file can delete or modify their own file.
You want to manage ownership by setting the setgid bit for a directory named projectData. Which command would correctly accomplish this? chown g+s projectData chgrp +s projectData chmod g+s projectData chmod u+g projectData
chmod g+s projectData
