Hostwinds Tutorials

Search results for:


Table of Contents


Basic Linux Filesystem Permissions Overview
What Are The Recommended Permissions?

What Are File System Permissions on Linux?

Tags: Linux 

Basic Linux Filesystem Permissions Overview
What Are The Recommended Permissions?

If you are working through cPanel or any Linux machine, you may have heard the term permissions. This is odd to hear at first, but essentially, these determine who has access to what files. For example, if you have your website, you will want visitors to view your website but not make any changes. This is done through proper permissions to ensure they can only read the files.  We will cover what permissions are and how you can use them to protect your files through your File Manager and is intended for Hostwinds clients using cPanel.

Basic Linux Filesystem Permissions Overview

Permissions exist within 3 different sections. There is the User section, Group section, and the World section. The User section affects how the owner of the file or folder can interact with it. The Group section will determine how other users within the same group can interact with the file or folder. Lastly, the World section says how other users can interact with the file or folder, whether they exist or not.

In each of those sections, there will be a number associated with the files/folders. This will determine the exact permissions that the section has. The number is essentially different permissions that are added up. For reading the contents of the file or folder, this would be a value of 4. Write permissions would be a value of 2. And Executable permissions would be a value of 1. With the permissions you want for the group, you would set this to be those numbers added up. For example, if you wanted the Others to have read and executable rights but not writable permissions, you would set that to be 5 (Executable plus Readable). Normally, you would see the permissions listed as a three or four-digit number—for example, 755 or 644.

Through cPanel, there is a wonderful interface that is available for changing File Permissions. This window is great for visualizing the permissions of a file or folder. It has checkboxes for each setting and is organized in columns for each section. In the image below, you can see what this would look like if the User (Owner) had read-only permissions, the Group members had to Write-only permissions, and the World (Others) had to Execute only permissions.

What Are The Recommended Permissions?

Usually, for a website, it is recommended that certain permissions be set up to increase security. The recommended permissions for directories would be 755. This would allow the owner (Presumably you) to perform any action on the folder and anyone else the ability to read and execute the folder. With files, it is recommended to have the permissions set to 644. Giving you the ability to read and write to the file and all others the ability only to read the file's contents.

It is highly recommended that you never use 777 permissions. This can give anyone access to your file or folder so that they can edit with malicious content or even delete the file. Whenever you change the permissions of a file or folder, you will always want to use the minimum permissions that you can be used.

If you should have any questions or would like assistance, please contact us through Live Chat or by submitting a ticket with our Technical Support team.

Written by Hostwinds Team  /  May 1, 2018