introduction to linux linux installation linux filesystem structure user and group management file permission command line interface package manager bash scripting conclusion
list



File permissions

File permission defines who can read and/or write to the file, and is the file executable or not.

To see a file permissions you can open the terminal and run the command (replace filename with the name of your file or directory)

ls -ld filename

result:

The string “drwxr-xr-x” is the file permission, let’s see what each letter represent

The next three characters represent the permissions for the owner of the directory:

The next three characters represent the permissions for the group that the directory belongs to:

The last three characters represent the permissions for other users (neither the owner nor part of the group):

So to read a file permission:

  1. the first letter indicate the filetype
  2. the next three letter indicate the owner permissions
  3. the next three letter indicate the group permissions
  4. the next three letter indicate others permissions
  5. permissions letter are: r for read, w for write, x for execute





DMCA.com Protection Status

© 2023 Aimed Guendouz