Question

In: Computer Science

[Linux permissions] Suppose that you are a superuser on a Linux system, and there is a...

  1. [Linux permissions] Suppose that you are a superuser on a Linux system, and there is a file “/home/alice/foo”, which is owned by an ordinary user Alice. You need to give a permission to read a this file to an ordinary user Bob, but no one else (of course, you as superuser will be able to read it too). Explain how you will do it.

Note: You do not have to provide specific commands, just a short description will suffice.

Solutions

Expert Solution

In order to achieve this problem, at first we can create a group; add the user Bob to that particular group and then change the ownership of that file to the specific user and later at the end, we can give the user 'Bob' particular read permissions so that he can read it and me as being a superuser has access to that file too.

Commands to be used:

So to achieve this, we first create a group by using the command:

addgroup NewGroup

Then we add Bob of that group

usermod -G NewGroup Bob

Then we change the file permissions to allow read access to the members of the NewGroup group.

chgrp Bob /home/alice/foo

chmod 400 /home/alice/foo

This file will remain owned by super user, but be readable by Bob and not by the other users.

Do UPVOTE this as I have put a lot of EFFORT in answering this question. It really helps me.

If you have any doubts, leave a comment below before rating. I'll be happy to assist you further.


Related Solutions

[Linux permissions] Suppose that you are a superuser on a Linux system, and there is a...
[Linux permissions] Suppose that you are a superuser on a Linux system, and there is a file “/home/alice/foo”, which is owned by an ordinary user Alice. You need to give a permission to read a this file to an ordinary user Bob, but no one else (of course, you as superuser will be able to read it too). Explain how you will do it. Note: You do not have to provide specific commands, just a short description will suffice. [Limitations...
1. When a file is created on Linux Operating System, What are the default permissions of...
1. When a file is created on Linux Operating System, What are the default permissions of the file? 2. Write a command to find the total disk space used by a specific user on linux system? 3. What is "s" permission bit in a file? 4. Explain the difference between grep and egrep? 5. Write a command to list files where third letter is x or y? 6. Write command to remove array element with id 5? 7. Write a...
USING COMMAND PROMPT ON LINUX. show how... Linux Users, Groups, and Permissions Lab Objective: Understand how...
USING COMMAND PROMPT ON LINUX. show how... Linux Users, Groups, and Permissions Lab Objective: Understand how to create user accounts Understand how to create group accounts Creating good password policies Understanding permissions and file sharing Setup: You will need a Ubuntu Server VM Walk Through: You are a system administrator who has been tasked to create user accounts for new users on your system. You can pick whatever theme you like as long as there are protagonist and antagonist users:...
Create by using Linux server • Create a file name it foo.txt • Remove all permissions...
Create by using Linux server • Create a file name it foo.txt • Remove all permissions from foo.txt • What happen if you try to read the file? • Change foo.txt permission to read and write only for owner • Change foo.txt permission to read for group • Change foo.txt permission to read and write everyone
Linux system
The two variables a and b have initial values of 1 and 2, respectively. The following code is for a Linux system:What possible errors are avoided by the use of the memory barriers?
1. Which Linux permissions would assign the owner full access, the group RX access, and everyone...
1. Which Linux permissions would assign the owner full access, the group RX access, and everyone else read access. 2. An attacker compromises the Washington Post's web server and proceeds to modify the homepage slightly by inserting a 1x1 pixel iframe that directs all website visitors to a webpage of his choosing that then installs malware on the visitors' computers. The attacker did this explicitly because he knows that US policymakers frequent the website. This would be an example of...
application that uses linux operating system amd justify the linux operating system. provide a suitable application...
application that uses linux operating system amd justify the linux operating system. provide a suitable application that uses linux os and justify the usage of linux os in the considered application.
When working in a Linux operating system and you mount a nfs permission on a drive,...
When working in a Linux operating system and you mount a nfs permission on a drive, what default permission are given? Working with swap partition as we have done, identify what a swap partition is and what is it used for? If a system has 16G or RAM, what is normal practice for the swap partition? What is debugfs? what does this command aid in when working on a filesystem?
In the Linux file system, the majority of the file system code exists in the kernel....
In the Linux file system, the majority of the file system code exists in the kernel. research the anatomy of the Linux file system, then discuss the effectiveness or ineffectiveness of this type of architecture. In addition, explain why you feel the way you do and provide support
System Administration Linux/Unix This lab is for you to research and implement old school DNS for...
System Administration Linux/Unix This lab is for you to research and implement old school DNS for your virtualized environment Currently, if you tried to ping your server01 by IP address (192.168.10.11), you would receive a response. If you tried to ping using its hostname "server01", it would result in "ping: hostname: Temporary failure in name resolution" 1) Research how and where to implement 2) Create the following entries: 192.168.10.1 router 192.168.10.11 SRV1 192.168.10.12 SRV2 192.168.10.13 client 3) Ensure these hostnames...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT