Applying secure file permissions
Unix systems have a unique way to manage permissions, which is quite different from Windows systems, so let's start with the basics about how permissions work in Unix systems.
Understanding ownership and permissions
Unix systems have three levels of file/folder ownership and this can be checked with the ls –l
command.
As seen in the following figure, the command shows us a lot of information such as hard links, who created the file, the file size, the last modification, and the name of the file or folder, and the most important part of ls
is the permissions:
Now, let's take a look at the permissions section, as seen in the following figure. The first section is the type of the file (in this example we have d
for directory or folder).
The other types are as follows:
-
: Regular file with different extensions such as.txt
,.php...