All Exams Test series for 1 year @ ₹349 only
Question

Consider the following statements :

(a) UNIX provides three types of permissions

Read

Write

Execute

(b) UNIX provides three sets of permissions

permission for owner

permission for group

permission for others

Which of the above statement/s is/are true ?

The correct answer is

Both (a) and (b)

Understanding UNIX File Permissions

UNIX-like operating systems use a robust permission system to control access to files and directories. This system is based on two main concepts: the types of actions allowed and the sets of users/groups to whom these permissions apply.

Analyzing Statement (a): Types of UNIX Permissions

Statement (a) says: UNIX provides three types of permissions: Read, Write, Execute.

Let's break down what these types mean:

  • Read (r):
    • For files: Allows viewing the contents of the file.
    • For directories: Allows listing the contents of the directory (filenames).
  • Write (w):
    • For files: Allows modifying or deleting the file's content.
    • For directories: Allows creating, deleting, or renaming files within the directory.
  • Execute (x):
    • For files: Allows running the file as a program or script.
    • For directories: Allows accessing files and subdirectories within the directory (you need execute permission on a directory to cd into it or access files inside it, even if you have read/write on the file itself).

These three types (Read, Write, Execute) are indeed the fundamental permission types in UNIX. Therefore, statement (a) is true.

Analyzing Statement (b): Sets of UNIX Permissions

Statement (b) says: UNIX provides three sets of permissions: permission for owner, permission for group, permission for others.

UNIX permissions are assigned based on who is trying to access the file or directory. These accessors fall into one of three categories or sets:

  • Owner: The user who owns the file or directory. This is typically the user who created it.
  • Group: A group of users. The file or directory is associated with a specific group, and permissions can be set for all members of that group.
  • Others: All other users on the system who are not the owner and are not members of the associated group.

For each file or directory, UNIX maintains separate sets of Read, Write, and Execute permissions for the owner, the group, and others. This three-tiered structure (owner, group, others) is standard in UNIX permissions. Therefore, statement (b) is true.

Conclusion

Both statement (a) regarding the types of permissions (Read, Write, Execute) and statement (b) regarding the sets of permissions (owner, group, others) accurately describe the UNIX file permission system.

Based on the analysis, both statements are true.

The correct option is the one stating that both (a) and (b) are true.

Summary of UNIX Permissions Analysis
Statement Description Truth Value
(a) Types of Permissions Read, Write, Execute True
(b) Sets of Permissions Owner, Group, Others True

Revision Table: Key UNIX Permission Concepts

UNIX File Permissions Overview
Concept Details
Permission Types Read (r), Write (w), Execute (x)
Permission Sets Owner (u), Group (g), Others (o)
Representation (Symbolic) e.g., rwxr-xr-x (Owner: rwx, Group: rx, Others: rx)
Representation (Numeric/Octal) r=4, w=2, x=1. Sum for each set. e.g., 755 (Owner: 4+2+1=7, Group: 4+1=5, Others: 4+1=5)

Additional Information: UNIX Permission Commands

Users often interact with UNIX file permissions using command-line tools. The primary command is chmod, used to change permissions.

  • Changing permissions symbolically:
    • Example: chmod u+w file.txt (add write permission for the owner)
    • Example: chmod go-r file.txt (remove read permission for the group and others)
    • Example: chmod ug=rwx,o=r file.txt (set owner and group to rwx, others to r)
  • Changing permissions numerically (octal):
    • Permissions are represented by summing the values: Read = 4, Write = 2, Execute = 1.
    • Example: chmod 755 file.txt (Owner: 4+2+1=7, Group: 4+1=5, Others: 4+1=5)
    • Example: chmod 600 private.txt (Owner: 4+2=6, Group: 0, Others: 0)

The ls -l command is used to view detailed file information, including the permission string (e.g., -rwxr-xr-x).

Was this answer helpful?

Important Questions from File System

  1. A mechanism for arranging controlled access to a shared resource, like a file, is called:

  2. Which UNIX/Linux command is used to make all files and sub-directories in the directory “progs” executable by all users?

  3. In Linux operating system environment ________ command is used to print a file.

  4. Match the following WINDOWS system calls and UNIX system calls with reference to process control and File manipulation.

    Windows

    UNIX

    A. Create-process( )

    I. Open( )

    B. WaitForSingleObject( )

    II. Close( )

    C. CreateFile( )

    III. Fork( )

    D. CloseHandle( )

    IV. Wait( )

  5. File manipulation operations in an operating system include:

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App