Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Explain basic permission bits on non-directories and directories files.

Every file and directory in our UNIX/Linux system has following three
permissions :

Non-Directories (Regular Files):

  1. Read (r): Think of it as the “Read” permission being like reading a book. If you have read permission on a file, you can open and read its contents.
  2. Write (w): The “Write” permission is like having the ability to write or edit in a notebook. If you have write permission on a file, you can modify its contents.
  3. Execute (x): The “Execute” permission is like the power to run a program. Without execute permission, even if you can read and write a program, you can’t run it like you can’t run a game without installing it.

Directories:

  1. Read (r): If you have read permission on a directory, you can see the list of files it contains. It’s like being able to look at the contents of a folder.
  2. Write (w): Having write permission on a directory is like being the manager of a folder. You can add, remove, or rename files inside the directory.
  3. Execute (x): The execute permission on a directory allows you to enter into it. Think of it as the ability to enter a room. Without execute permission on a directory, you can’t access its contents, even if you can see the list of files (read permission).

So, in summary:

  • Read: View contents of a file or list files in a directory.
  • Write: Modify contents of a file or manage files in a directory.
  • Execute: Run a program (for files) or access contents of a directory.

Leave a Comment