File System Hierarchy
- See also: File System Hierarchy
Every file and folder has its own permissions. The permission system comprises of three entities: Owner(u), Group(g) and Other(o) respectively.
Here's an example file seen using the command ls -l
-rwxr-xr-x boymom 12 00:00 example.txt
The permissions part is comprised of a directory/file flag and three sets of permissions for each entity. The other columns contain: the owner of the file/directory, the size in bytes, the time modified and finally the file/directory name.
The file above has the directory flag clear, Read/Write/eXecute permissions for the Owner(u), eXecute/Read permissions for the Group(g) and only eXecute permissions for Other(o).
drwxrwxrwx Would allow everyone to fully access the directory.
-rwx------ Would only allow the owner access to the file.
The u,g,o flags for each entity are used for the chmod command