eolas/zk/File_permissions_in_Linux.md

1.1 KiB

tags created
Linux
permissions
Friday, April 11, 2025

File permissions in Linux

View permissions

ls -rfl

What the letters mean

drwxr-xr-x  2 thomas thomas  4096 Jan 21 18:00 dist
drwxr-xr-x  2 thomas thomas  4096 Dec 29 12:50 out
-rw-r--r--  1 thomas thomas  1108 Jan 21 17:42 README.md

The first column of the permissions output is known as the file's mode. The sequence from left to right is as follows:

-       - - -                 - - -                 - - -
type    user permissions      group permissions     other permissions
type
The file type. A dash just means an ordinary file. `d` means directory
user permissions
read, write or execute. A dash means 'nothing': the permissions for that slot in the set have not be assigned
group and other
group is obviously what anyone belonging to the current file's user group can do. Everyone else (outside of the user and the group) is covered by the other permissions, sometimes known as 'world' permissions