/    /  OS – Protection in File System

Protection in File System

 

Users want to protect the information stored in the file system from improper access and physical damage. 

To protect our information, one can make duplicate copies of the files, some systems automatically copy the files to protect the user from losing important information if the original files are accidentally destroyed.

There can be situations of hardware errors like extreme temperature, vandalism, head crashes, failures, etc that may cause damage to the files. 

To understand protection better we will need to understand the types of access.

 

Types of access:

File sharing is the method of providing partial or full access to the users of the file system, as multiple users have access to the same data, there is a need for protection. 

One way to protect file systems can be to prohibit access, but it is an extreme scenario and is not of practical use.

What is needed is controlled access. It may depend on various factors.

 

These are the following operations that can be controlled:

  1. Delete
  2. Append
  3. Execute
  4. Read
  5. Write
  6. List

 

However, protection is provided only at a lower level. For example, copying a file may be implemented by simply providing a sequence of read requests. In this scenario, a user with read access can copy the file and print it, and so on.

 

Access Control

There are numerous ways to access any file, one of the prominent ones is to associate identity-dependent access with all files and directories. A list is created called the access-control list which enlists the names of users and the type of access granted to them. However, it is very long as all the users need to be listed down. This process can often be tedious and unrewarding, especially if one does not have the list of users before the task. 

 

To resolve this situation and condense the length of access-control list, the following classifications are used:

  1. Owner: The user who created the file.
  2. Group: The set of users sharing the same file.
  3. Universe: All the other users.

 

Other ways of protection:

Another approach is to use passwords to enable access to the file systems. 

However, this method has certain disadvantages:

  1. If one password is used for all the files, then in a situation where the password happens to be known by the other users, all the files will be accessible.
  2. It can be difficult to remember a lengthy and large number of passwords.

 

Reference 

Protection in File System