What Is CHMOD?

You might be wondering what CHMOD is, as you might see it in the settings menu of your FTP software. CHMOD is a way to set permissions for a file or folder on a computer. Let's get started!

What is CHMOD?

CHMOD is a way for you to set permissions for a file or folder on a Linux file system (Majority of web-hosting providers use Linux, although some use Windows. If your web server uses Windows, this guide will not be helpful). For example, you can set who can view (Read), edit (Write) and Execute each file or folder. There are three different categories of people you can set permissions for. Number one is the owner of the file, number two is the group, and number three is the public. There are two different notations for CHMOD, numeric and symbolic. Numeric CHMOD looks something like “777” while symbolic CHMOD looks something like “rwxrwxrwx”. Numeric CHMOD is the most popular in FTP systems. Here is an example of what this might look like:

Example of CMOD settings on a Linux web server

Do not set CHMOD below 600! This will remove your ability to edit or delete the file, and it will be stuck in its location forever (There may be fixes, but fixing it will be impossible if you don’t own the computer, like a web server).

Advertisement

CHMOD with web-hosting

Most files only need a CHMOD of 644 (rw-r--r--). This level allows you (As the owner of the file) to edit the file, but restricts others from doing so (Because they don’t have write access). Read access is the only thing that web browsers require to run for most files. If you set a CHMOD below 600, you will no longer be able to edit or remove the file, and it will be stuck in that location forever. To set the CHMOD, right-click on the file (For most FTP software) and click “CHMOD” or “Permissions”. You should get a pop-up similar to the screenshot above.

Calculating CHMOD

Although you can calculate CHMOD yourself with both notations, you may just want to use an online tool such as Chmod Calculator. If you want to calculate it yourself, symbolic CHMOD is the easiest. In symbolic CHMOD, there are three sets of three characters. An “r” stands for Read, “w” stands for Write, and “x” stands for Execute. Lastly, a dash (“-”) can be used to replace either the “r” “w” or “x”. A dash means that the permission is denied for that group, and that permission. The first three characters are for the “Owner” group, the second three are for the “Group” group, and the third three are for the “Public” group. The order is always Read-Write-Execute. For example, “rwxrwxrwx” means that all three groups have full permission. “rw-rw-rw-” means that all groups have Read-Write access, but none have Execute access. Lastly, “rwxr--r--” means that the owner group has full permission, while the “Group” and “Public” groups only have read access.

Final Summary

I hope this article was helpful in your understanding of CHMOD and file permissions. If this is still a bit confusing, don’t worry, everything takes time to learn! Your hosting provider may be able to share more details about how their system works if what yousee does not match this guide. Enjoy your day, and don’t lock yourself out (CHMOD below 600)!

Advertisement

Article by Tinkerman

Related Articles