LPI E - Permission Test
5.3 Managing File Permissions and Ownership
Understanding and manipulating file permissions and ownership settings
Practice Exam Scenarios 2
Sceario #1 Here: https://www.certificationmethods.com/2023/05/lpi-e-sticky-gid-uid-test.html
Scenario 1:
You are trying to execute a shell script located in the /home/user/scripts directory. The script is owned by the user "user" and has the following permissions:-rwxrwx---
You are logged in as the user "guest" and are not a member of the "user" group.
--------------------------
Answer 1 Below:
--------------------------
/* --------------------- */
No, you cannot execute the script as the "guest" user. The "rwx" permissions at the beginning of the file permissions indicate that the owner, group, and others have read, write, and execute permissions. Since the "guest" user is not the owner or a member of the group associated with the file, they fall under the "others" category.Scenario 2:
You are a member of the "admin" group on a Linux server, and you need to modify a configuration file located in the /etc directory. The file is owned by the user "root" and has the following permissions:-rw-r--r--
--------------------------
Answer 2 Below:
--------------------------
/* --------------------- */
As a member of the "admin" group, you can use the "sudo" command to modify the configuration file. The "sudo" command allows you to temporarily elevate your privileges to perform administrative tasks.Scenario 3:
You are the owner of a file located in the /var/log directory that has the following permissions:-rw-r-----, and you want to allow all users on the system to read the file.
--------------------------
Answer 3 Below:
--------------------------
/* --------------------- */
To allow all users to read the file, you can modify the permissions using the "chmod" command. Specifically, you can add the "r" permission for "others" by running the command: chmod o+r /var/log/filename. This will change the file permissions to "-rw-r--r--", which means that all users on the system can now read the file.Scenario 4:
You are trying to access a directory located in the /home/user directory, but you receive the following error message: "Permission denied". The directory has the following permissions:drwxr-xr--
--------------------------
Answer 4 Below:
--------------------------
/* --------------------- */
The "Permission denied" error message indicates that you do not have the necessary permissions to access the directory. The directory permissions are set to "drwxr-xr--", which means that the owner has read, write, and execute permissions, the group has read and execute permissions, and "others" have no permissions.Scenario 5:
You are a member of the "developers" group and you need to create a new directory in the /home directory that is accessible to all members of the "developers" group.--------------------------
Answer 5 Below:
--------------------------
/* --------------------- */
To create a new directory in the /home directory that is accessible to all members of the "developers" group, you can use the "mkdir" and "chgrp" commands. First, create the new directory using the "mkdir" command: mkdir /home/new_directory. Then, change the group ownership of the directory to the "developers" group using the "chgrp" command: chgrp developers /home/new_directory.Disclaimer:
Therefore, while I have made every effort to ensure the accuracy and relevance of the samples provided, I cannot guarantee that they will reflect the content or difficulty level of the actual exam. Additionally, I do not endorse or have any affiliation with the Linux Professional Institute (LPI).
I strongly recommend that candidates use these samples as an additional resource for their exam preparation, in combination with other study materials and practice tests. Ultimately, success on the LPI Linux certification exams will depend on an individual's knowledge, experience, and understanding of the exam objectives.
By using these samples, you agree that neither the provider of these sample questions nor any of its affiliates or employees shall be liable for any damages arising from your use or reliance on these sample questions or any information provided herein.
Comments