File / Directory Permission on Linux Ubuntu

wahyu eko hadi saputro
3 min readAug 9, 2022

Ok on this occasion let’s discuss linux ubuntu file permission. As we know in linux everything is treated as a file. As a file of course it must have permission attributes, and sometimes not everyone understands permission attributes on a file / directory. In this article I will explain the meaning of file permission attributes.

File permission explanation:

Under Linux, permissions are grouped by owner, group, and others, with read, write, an

execute permission assigned to each, as follows:

r indicates permission for an owner, a member of the owner’s group, or others to open and read the file.

w indicates permission for an owner, a member of the owner’s group, or others to open and write to the file.

x indicates permission for an owner, a member of the owner’s group, or others to execute the file (or read a directory).

Many users prefer to use numeric codes, based on octal (base 8) values, to represent per-missions.

We can use the ls -al command on linux to get detailed information. Example :

File Type : Common indicators of the type of file are in the leading letter in the output. A blank (which is represented by a dash, as in the preceding example) designates a plain file, d designates a directory, c designates a character device (such as /dev/ttyS0 ), l indicates a symbolic link, and b is used for a block device (such as /dev/sda ).

Permissions : Read, write, and execute permissions may be assigned for the owner,

group, and all others on the system.

Link Count : The number 1 designates that there is only one file, and any other number indicates that there might be one or more hard-linked files. Links are created with the ln command. A hard-linked file is a pointer to the original file, which might be located elsewhere on the system. Only the root operator can create a hard link of a directory.

Owner : This is the account that owns the file; it is originally the file creator, but you can change this designation by using the chown command.

Group : This is the group of users allowed to access the file; it is originally the file creator’s main group, but you can change this designation by using the chgrp command.

File size : size of the file

Last access date/time : the date of the file creation / modification

Filename : filename of the file

Source :

Ubuntu Linux Unleashed 2021 Edition 14th Edition.pdf

2020712201111807Richard_Blum,_Christine_Bresnahan.pdf

--

--