Knowee
Questions
Features
Study Tools

Task 1. Check file and directory detailsIn this task, you must explore the permissions of the projects directory and the files it contains. The lab starts with /home/researcher2 as the current working directory. This is because you're changing permissions for files and directories belonging to the researcher2 user.Navigate to the projects directory.List the contents and permissions of the projects directory.The permissions of the files in the projects directory are as follows:Note: The date and time information returned is the same as the date and time when you ran the command. Therefore, it is different from the date and time in the example.As you may recall from the video lesson, a 10-character string begins each entry and indicates how the permissions on the file are set. For instance, a directory with full permissions for all owner types would be drwxrwxrwx:The 1st character indicates the file type. The d indicates it’s a directory. When this character is a hyphen (-), it's a regular file.The 2nd-4th characters indicate the read (r), write (w), and execute (x) permissions for the user. When one of these characters is a hyphen (-) instead, it indicates that this permission is not granted to the user.The 5th-7th characters indicate the read (r), write (w), and execute (x) permissions for the group. When one of these characters is a hyphen (-) instead, it indicates that this permission is not granted for the group.The 8th-10th characters indicate the read (r), write (w), and execute (x) permissions for the owner type of other. This owner type consists of all other users on the system apart from the user and the group. When one of these characters is a hyphen (-) instead, that indicates that this permission is not granted for other.The second block of text in the expanded directory listing is the user who owns the file. The third block of text is the group owner of the file.

Question

Task 1. Check file and directory detailsIn this task, you must explore the permissions of the projects directory and the files it contains. The lab starts with /home/researcher2 as the current working directory. This is because you're changing permissions for files and directories belonging to the researcher2 user.Navigate to the projects directory.List the contents and permissions of the projects directory.The permissions of the files in the projects directory are as follows:Note: The date and time information returned is the same as the date and time when you ran the command. Therefore, it is different from the date and time in the example.As you may recall from the video lesson, a 10-character string begins each entry and indicates how the permissions on the file are set. For instance, a directory with full permissions for all owner types would be drwxrwxrwx:The 1st character indicates the file type. The d indicates it’s a directory. When this character is a hyphen (-), it's a regular file.The 2nd-4th characters indicate the read (r), write (w), and execute (x) permissions for the user. When one of these characters is a hyphen (-) instead, it indicates that this permission is not granted to the user.The 5th-7th characters indicate the read (r), write (w), and execute (x) permissions for the group. When one of these characters is a hyphen (-) instead, it indicates that this permission is not granted for the group.The 8th-10th characters indicate the read (r), write (w), and execute (x) permissions for the owner type of other. This owner type consists of all other users on the system apart from the user and the group. When one of these characters is a hyphen (-) instead, that indicates that this permission is not granted for other.The second block of text in the expanded directory listing is the user who owns the file. The third block of text is the group owner of the file.

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

To complete Task 1, follow these steps:

  1. Open your terminal.

  2. Navigate to the projects directory by typing the following command and pressing Enter:

cd /home/researcher2/projects
  1. List the contents and permissions of the projects directory by typing the following command and pressing Enter:
ls -l

This command will display a list of files in the directory along with their permissions, the number of links, the owner, the group, the size of the file, the time it was last modified, and the filename.

The permissions are displayed as a 10-character string at the beginning of each entry. Here's how to interpret it:

  • The 1st character indicates the file type. 'd' means it's a directory, '-' means it's a regular file.
  • The 2nd-4th characters represent the read (r), write (w), and execute (x) permissions for the user. A hyphen (-) instead of a letter indicates that the permission is not granted.
  • The 5th-7th characters represent the read (r), write (w), and execute (x) permissions for the group. A hyphen (-) instead of a letter indicates that the permission is not granted.
  • The 8th-10th characters represent the read (r), write (w), and execute (x) permissions for others. A hyphen (-) instead of a letter indicates that the permission is not granted.

The second block of text in the expanded directory listing is the user who owns the file. The third block of text is the group owner of the file.

This problem has been solved

Similar Questions

The new employee, researcher9, will take responsibility for project_r. In this task, you must make them the owner of the project_r.txt file.The project_r.txt file is located in the /home/researcher2/projects directory, and owned by the researcher2 user.Use the chown command to make researcher9 the owner of /home/researcher2/projects/project_r.txt.Click Check my progress to verify that you have completed this task correctly.

In this task, you must determine whether any files have incorrect permissions and then change the permissions as needed. This action will remove unauthorized access and strengthen security on the system.None of the files should allow the other users to write to files.Check whether any files in the projects directory have write permissions for the owner type of other.

The file project_m.txt is a restricted file and should not be readable or writable by the group or other; only the user should have these permissions on this file. List the contents and permissions of the current directory and check if the group has read or write permissions.

Check whether any hidden files exist in the projects directory.

A new employee has joined the Research department. In this task, you must add them to the system. The username assigned to them is researcher9.Write a command to add a user called researcher9 to the system.Next, you need to add the new user to the research_team group.Use the usermod command and -g option to add researcher9 to the research_team group as their primary group.

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.