The IT Certification Resource Center

Featured Deal

Get CompTIA, Cisco, and Microsoft training courses free for a week.
Learn More ❯

This free practice test contains 14 questions and answer explanations covering the file ownership and permissions objectives of the LPI Linux Essentials. These practice questions are excerpted from the LPI Linux Certification All-in-One Exam Guide by Robb H. Tracy (McGraw-Hill, 2013) with permission from McGraw-Hill.

Question 1:

You need to change the owner of a file named /var/opt/runme from mireland, who is a member of the users group, to dnelson, who is a member of the editors group. Assuming you want to change both user and group owners, which command will do this?

A. chown mireland dnelson /var/opt/runme
B. chown -u "dnelson" -g "editors" /var/opt/runme
C. chown dnelson /var/opt/runme
D. chown dnelson.editors /var/opt/runme

 

Question 2:

Which permission, when applied to a directory in the file system, will allow a user to enter the directory?

A. Read
B. Write
C. Execute
D. Access Control

 

Question 3:

A user needs to open a file, edit it, and then save the changes. What permissions does he need to do this? (Choose two.)

A. Read
B. Write
C. Execute
D. Modify

 

Question 4:

A file named employees.odt has a mode of rw-r- -r- -. If rtracy is the file's owner, what can he do with it?

A. He can open the file and view its contents, but he can't save any changes.
B. He can open the file, make changes, and save the file.
C. He can change ownership of the file.
D. He can run the file if it's an executable.

 

Question 5:

A file named employees.odt has a mode of rw-r- -r- -. If mhuffman is not the file's owner but is a member of the group that owns this file, what can he do with it?

A. He can open the file and view its contents, but he can't save any changes.
B. He can open the file, make changes, and save the file.
C. He can change ownership of the file.
D. He can run the file if it's an executable.

 

Question 6:

A file named employees.odt has a mode of rw-r- -r- -. If mireland is not the file's owner and is not a member of the group that owns this file, what can she do with it?

A. She can open the file and view its contents, but she can't save any changes.
B. She can open the file, make changes, and save the file.
C. She can change ownership of the file.
D. She can run the file if it's an executable.

 

Question 7:

A file named myapp has a mode of 755. If dnelson doesn't own this file and isn't a member of the group that owns the file, what can she do with it?

A. She can change the group that owns the file.
B. She can open the file, make changes, and save the file.
C. She can change ownership of the file.
D. She can run the file.

 

Question 8:

You need to change the permissions of a file named schedule.odt such that the file owner can edit the file, users who are members of the group that owns the file can edit it, and users who are not owners and don't belong to the owning group can view it but not modify it. Which command will do this?

A. chmod 664 schedule.odt
B. chmod 555 schedule.odt
C. chmod 777 schedule.odt
D. chmod 644 schedule.odt

 

Question 9:

You just created a new script file named myapp.sh. However, when you try to run it from the command prompt, the bash shell generates an error that says -bash: ./myapp.sh: Permission denied. Which command will fix this problem?

A. chmod u+r myapp.sh
B. chmod u+x myapp.sh
C. chmod u+w myapp.sh
D. chmod u+T myapp.sh

 

Question 10:

Your Linux system's umask variable is currently set to a value of 077. A user named jcarr (who is a member of the users group) creates a file named mythoughts.odt. What can users who are members of the users group do with this file?

A. They can view the file, but they can't modify or save it.
B. They can open, modify, and save the file.
C. They can open, modify, and save the file. They can also execute the file if it is an executable.
D. They have no access to the file at all.

 

Question 11:

An executable file has the SUID permission set. If this file is run on the system, who owns the file?

A. The user who created the file remains the owner.
B. The user who ran the file becomes the file's permanent owner.
C. The user who ran the file becomes the file's temporary owner.
D. The root user becomes the file's owner.

 

Question 12:

The /Projects directory has the SGID special permission set. What effect does this have when a user tries to create a file in this directory? (Choose two.)

A. The file's owner is set to the user who created the file.
B. The file's owner is set to the user who owns the directory.
C. The owning group of the file is set to the owning group of the directory.
D. The owning group of the file is set to the primary group of the user who created the file.
E. The file's owner is set to root.
F. The owning group of the new file is set to the root group.

 

Question 13:

Which special permission can't be assigned to a file?

A. SUID
B. SGID
C. sticky bit
D. None of the above. All special permissions can be assigned to a file.

 

Question 14:

A directory is owned by the users group and has a mode of rwxrwxr- - permissions assigned to that group. It also has the Sticky Bit permission set. What effect does this have on files within the directory?

A. Users who are members of the users group can only delete files within the directory for which they are the owner.
B. No user is allowed to delete files in this directory.
C. Users who are members of the users group can delete any file within the directory.
D. Others can enter the directory and delete files within the directory for which they are the owner.

 

Congratulations, you have completed this practice quiz and are one step closer to getting certified! Thanks again to Robb Tracy and McGraw-Hill for these practice questions, which are excerpted from the LPI Linux Certification All-in-One Exam Guide by Robb H. Tracy (McGraw-Hill, 2013) with permission from McGraw-Hill.

For fully-featured test simulation software that will keep score and help you identify your areas of strength and weakness, surf on over to the GoExam Practice Test Center.