Search The Hostwinds Guides Knowledge Base

What Are Permissions on Linux?

Share:

If you are working through cPanel or on any Linux machine, you may have heard the term permissions. This is odd to hear at first, but essentially these are what 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 the basics of 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 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. With the Group section, this will determine how other users that exist within the same group can interact with the file or folder. Lastly, the World section says how other users, whether they exist or not, can interact with the file or folder.

In each of those sections, there will be a number associated with the files / folders as well. 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 that 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 though, 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 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 Write only permissions and the World (Others) had Execute only permissions.

The options that are available in the cPanel file Permissions dialog

What Are The Recommended Permissions?

Usually for a website, it is recommended that certain permissions be setup 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 to only read the contents of the file.

It is heavily 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 minimal permissions that you can be used.

 

If you should have any questions or would like assistance, do feel free to contact us through Live Chat, on our Phones, or by submitting a ticket with our Technical Support team.

 


Share:

Leave a Reply

Your email address will not be published. Required fields are marked *