Question

In: Computer Science

File permissions let us control who can: a. change how files are executed only b. create...

File permissions let us control who can:

a.

change how files are executed only

b.

create files only

c.

delete files only

d.

read, write, and execute a file

Solutions

Expert Solution

Basic File Permissions

Permission Groups

Each file and directory has three user based permission groups:

  • owner – The Owner permissions apply only the owner of the file or directory, they will not impact the actions of other users.
  • group – The Group permissions apply only to the group that has been assigned to the file or directory, they will not effect the actions of other users.
  • all users – The All Users permissions apply to all other users on the system, this is the permission group that you want to watch the most.

Permission Types

Each file or directory has three basic permission types:

  • read – The Read permission refers to a user’s capability to read the contents of the file.
  • write – The Write permissions refer to a user’s capability to write or modify a file or directory.
  • execute – The Execute permission affects a user’s capability to execute a file or view the contents of a directory.

Viewing the Permissions

You can view the permissions by checking the file or directory permissions in your favorite GUI File Manager (which I will not cover here) or by reviewing the output of the “ls -l” command while in the terminal and while working in the directory which contains the file or folder.

The permission in the command line is displayed as: _rwxrwxrwx 1 owner:group

  1. User rights/Permissions
    1. The first character that I marked with an underscore is the special permission flag that can vary.
    2. The following set of three characters (rwx) is for the owner permissions.
    3. The second set of three characters (rwx) is for the Group permissions.
    4. The third set of three characters (rwx) is for the All Users permissions.
  2. Following that grouping since the integer/number displays the number of hardlinks to the file.
  3. The last piece is the Owner and Group assignment formatted as Owner:Group.

Modifying the Permissions

When in the command line, the permissions are edited by using the command chmod. You can assign the permissions explicitly or by using a binary reference as described below.

Explicitly Defining Permissions

To explicity define permissions you will need to reference the Permission Group and Permission Types.

The Permission Groups used are:

u – Owner

g – Group

o – Others

a – All users

The potential Assignment Operators are + (plus) and – (minus); these are used to tell the system whether to add or remove the specific permissions.

So for an example, lets say I have a file named file1 that currently has the permissions set to _rw_rw_rw, which means that the owner, group and all users have read and write permission. Now we want to remove the read and write permissions from the all users group.

To make this modification you would invoke the command: chmod a-rw file1
To add the permissions above you would invoke the command: chmod a+rw file1

As you can see, if you want to grant those permissions you would change the minus character to a plus to add those permissions.


Related Solutions

Create a file and change the file permissions to (a) make it executable, (b) enable the...
Create a file and change the file permissions to (a) make it executable, (b) enable the SUID, and (c) use the ACL to add a permission for the root user. Do a long listing of this file. LINUX command line / virtual box.
How can bias change results in a study? How can buy us influence a person who...
How can bias change results in a study? How can buy us influence a person who wants to conduct a study? What key things can you look for when conducting a study to eliminate bias?
describe how the sense of control (primary vs secondary) can change with aging
describe how the sense of control (primary vs secondary) can change with aging
How can bias change results in a study? How can bias influence a person who wants...
How can bias change results in a study? How can bias influence a person who wants to conduct a study? What key things can you look for when conducting a study to eliminate bias?
How can bias change results in a study? How can bias influence a person who wants...
How can bias change results in a study? How can bias influence a person who wants to conduct a study? What key things can you look for when conducting a study to eliminate bias?
Language:c++ choice b and c dont display the file rearranged why is that and how can...
Language:c++ choice b and c dont display the file rearranged why is that and how can i fix it? #include<iostream> #include <fstream> using namespace std; #define size 10000 // Displays the current Inventory Data void Display(int box_nums[], int nboxes[], double ppBox[], int n) // Prints Box number , number of boxes and price per box. {    cout << "Box number Number of boxes in stock Price per box" << "\n";    cout << "-------------------------------------------------------------\n";    for (int i =...
What is sociological imagination? How can using the sociological imagination give us the power to change...
What is sociological imagination? How can using the sociological imagination give us the power to change the world? Give a suitable example.
1. First example where Technology enables us to change our environments. Discuss how can this be...
1. First example where Technology enables us to change our environments. Discuss how can this be a H2M relationship that is Symbiotic and cooperative. 2. Second example where Technology changes us and drive us to change ourselves and our behavior as humans. Discuss how can this be or become a Human to Machine (H2M) confrontation and a clash of human vs. machine
How can I create a normal distribution in excel when the only data I have is...
How can I create a normal distribution in excel when the only data I have is mean and standard deviation?
5. a) Explain how to budget deficit can create a trade deficit. b) Briefly discuss how...
5. a) Explain how to budget deficit can create a trade deficit. b) Briefly discuss how time lag could be an argument against policy activism. What is the role of automatic stabilizer in this context? Explain with examples c) What is the time inconsistency problem? Give two examples of time inconsistency problem that are not in your book.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT