Linux File Permissions

Most of this was cribbed from https://linuxhandbook.com/linux-file-permissions/

You can get an output of permissions on a file or directory by passing the -l flag to the ls command: ls -l

Output looks something like this:

-rwxrw-r-- 1 abhi itsfoss 457 Aug 10 11:55 agatha.txt

File type: Denotes the type of file. d means directory, – means regular file, l means a symbolic link.

Permissions: This field shows the permission set on a file. I’ll explain it in detail in the next section.

Hard link count: Shows if the file has hard links. Default count is one.

User: The user who owns the files.

Group: The group that has access to this file. Only one group can be the owner of a file at a time.

File size: Size of the file in bytes.

Modification time: The date and time the file was last modified.

Filename: Obviously, the name of the file or directory.

rwx-:

r : Read permission

w : Write permission

x : Execute permission

– : No permission set