Question

Suppose that you are a superuser on a Linux system, and there is a file “/home/bob/foo”,...

Suppose that you are a superuser on a Linux system, and there is a file “/home/bob/foo”, which is owned by an ordinary user Bob. You need to give a permission to read this file to an ordinary user Alice, 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.

Homework Answers

Answer #1

As given, In Linux system there is a file “/home/bob/foo”, which is owned by an ordinary user Bob. We need to give read permissions to Alice also, but not anyone else. To solve this, first, we need to create a group and need to add users Bob and Alice. Then we need to change the file permissions so that the newly created group can read that file.

  • Let us create a group first,

groupadd GROUP1

  • Then add Aice in that group,

usermod -a -G GROUP1 Alice

  • Change the file permission so that Alice and the super owner can read that document(Not even Bob).

chgrp Alice /home/bob/foo

chmod 400  /home/bob/foo

As we have changed group ownership also, Bob can not access this file.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Linux Operation SECTION 2 – File and Directory Permissions: FILE PERMISSIONS: What is the command used...
Linux Operation SECTION 2 – File and Directory Permissions: FILE PERMISSIONS: What is the command used to find out which user account you are logged into?      . This command may come in handy in the following exercises. Ensure you are in your home directory of the student1 account. Use the echo command with output redirection to create a file called labfile4 and put the following text in this file: “This is the first line of labfile4”. Using the symbolic notation...
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and...
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and the output in a word document and submit it. Part1: 1. Log in to Linux using your user account name and password. 2. If you logged in using a graphical login screen, open a terminal window by clicking on the icon in the lower left corner of the desktop to open the main menu, then selecting System Tools, then Terminal. A terminal window opens....
Each part of this lab will use the same input file, named “lab3-in.dat.” This file will...
Each part of this lab will use the same input file, named “lab3-in.dat.” This file will be located in the same directory as the executables (do not specify a path for the file in the Select statements). This file is a roster of animals in a travelling carnival. The record format for the file is as follows: Field Description Length Data Type Name 12 String Gender 1 String Species 15 String The end result of each part of this assignment...
As the system administrator, you have received a memo saying that Leslie, Ronsam, Xochi, and Sara...
As the system administrator, you have received a memo saying that Leslie, Ronsam, Xochi, and Sara have been assigned to a work group to do some analysis and they need to work on your Linux system. You need to add these folks as regular users and give them an alternate group that they can switch into. You also need to set up a common folder for them to work in. Your plan is to create a new group called ‘analysis’...
I did already posted this question before, I did get the answer but i am not...
I did already posted this question before, I did get the answer but i am not satisfied with the answer i did the code as a solution not the description as my solution, so i am reposting this question again. Please send me the code as my solution not the description In this project, build a simple Unix shell. The shell is the heart of the command-line interface, and thus is central to the Unix/C programming environment. Mastering use of...
You will write a program that loops until the user selects 0 to exit. In the...
You will write a program that loops until the user selects 0 to exit. In the loop the user interactively selects a menu choice to compress or decompress a file. There are three menu options: Option 0: allows the user to exit the program. Option 1: allows the user to compress the specified input file and store the result in an output file. Option 2: allows the user to decompress the specified input file and store the result in an...
Create a very simple TCP Application in JAVA. You will create a client and a server....
Create a very simple TCP Application in JAVA. You will create a client and a server. The client must execute after you start the server. Here is what they will do. The client will read from the console a string that the users enters. This string will be the name of the user, let's say Bob. The client then sends the name, Bob, in an Object Stream, to the server. The server will receive this Object Stream and send to...
MIPS ASSEMBLY Have the user input a string and then be able to make changes to...
MIPS ASSEMBLY Have the user input a string and then be able to make changes to the characters that are in the string until they are ready to stop. We will need to read in several pieces of data from the user, including a string and multiple characters. You can set a maximum size for the user string, however, the specific size of the string can change and you can’t ask them how long the string is (see the sample...
Create a State machine diagram, class diagram and a sequence diagram A description of the System...
Create a State machine diagram, class diagram and a sequence diagram A description of the System Hjolaleidir.is - Better Biking routes The group “Better biking routes” has got the idea of making the website: hjolaleidir.is for cyclists in the greater Reykjavik area. The group “Better biking routes” want to make the website accessible for a broad spectrum of users. They are catering to users who want information about good routes from a place to a destination and users who wish...
A newly developed hospital requires an Electronic Decision Support System (DSS) for clinicians. This DSS is...
A newly developed hospital requires an Electronic Decision Support System (DSS) for clinicians. This DSS is required to have all the necessary features to help the practice. Develop a Software Requirements Specification (SRS) document that identifies all the necessary requirements for the system. This document must strictly follow the IEEE template uploaded on canvas. However, there may be sections in the template that may not apply to the project, these sections can be eliminated. Use the template below to answer...