unixPermissions


Introduction

In unix each files has certain permissions like read, write and execute. A user can manipulate the permissions of a file using 'chmod' command.

Remarks

In UNIX, there are three permissions used to grant a certain level of access to a file or folder.

For files:

  • Read: Allow the user/group/others to read a file.
  • Write: Allow the user/group/others to modify a file.
  • Execute: Allow the user/group/others to execute (or run) a file.

These are slightly changed for directories:

  • Read: Allow the user/group/others to list the names of files in a directory.
  • Write: Allow the user/group/others to create, delete and rename files in a directory.
  • Execute: Allow the user/group/others to access file metadata and contents for a directory.

These permissions can be represented using the letters "r" for read, "w" for write, and "x" for execute. They can also be represented numerically: 4 for read, 2 for write and 1 for execute.