permission numbering

Status
Not open for further replies.

m2k198174

New Member
Messages
1
Reaction score
0
Points
0
I need support for permission numbering in the file manager. what does that number means? And how can be they used?
 

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
Hello,

You don't really need to worry too much about it. Generally, files should be 644 and directories 755.
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
Hello,

Think of the permission numbers as a grid, like so
Code:
+---------+-------+-------+----------+
|         |  You  | Group | Everyone |
+---------+-------+-------+----------+
| Read    |   4   |   4   |    4     |
+---------+-------+-------+----------+
| Write   |   2   |   2   |    2     |
+---------+-------+-------+----------+
| Execute |   1   |   1   |    1     |
+---------+-------+-------+----------+
| Total   |   7   |   7   |    7     |
+---------+-------+-------+----------+

(You can think of Group as just another name for You, since you are the only one in your group)

As you can see, each "action" (read/write/execute) gets assigned a number. If you want the "user" (you/group/everyone) to be able to perform that "action", you give them that number. If you do NOT want them to be able to perform that "action", you put 0 in for that number instead. When you add up all the numbers, you get the "Total" column, which is what is shown in the cPanel file manager.

Let's look at some more practical examples. You'll see that your files are all marked 644 (ignore the 0 in front of it, it doesn't mean anything for the purpose of this explanation). When put in the chart, you get this:
Code:
+---------+-------+-------+----------+
|         |  You  | Group | Everyone |
+---------+-------+-------+----------+
| Read    |   4   |   4   |    4     |
+---------+-------+-------+----------+
| Write   |   2   |   0   |    0     |
+---------+-------+-------+----------+
| Execute |   0   |   0   |    0     |
+---------+-------+-------+----------+
| Total   |   6   |   4   |    4     |
+---------+-------+-------+----------+
As you can see, you have the ability to read and write to the file, but everyone else only has the ability to read it.

Now, you may be wondering what execute is used for. It has two uses: 1) it allows you to execute a file (think of a .exe on Windows, where you execute it to run what is inside, if you ever try opening a .exe in Notepad, all you see is a bunch of gibberish), and 2) it allows you to see all the files inside of a folder. That means if you have a folder with 644 permissions, even though you can read the files inside of it IF you know the filename, you can't actually see the list of files. That is why we have folders set to 755, like so:
Code:
+---------+-------+-------+----------+
|         |  You  | Group | Everyone |
+---------+-------+-------+----------+
| Read    |   4   |   4   |    4     |
+---------+-------+-------+----------+
| Write   |   2   |   0   |    0     |
+---------+-------+-------+----------+
| Execute |   1   |   1   |    1     |
+---------+-------+-------+----------+
| Total   |   7   |   5   |    5     |
+---------+-------+-------+----------+

As for how this affects you, the short answer is that it really doesn't. As can be seen, you only want to give yourself the ability to write to your files so that nobody else can mess with them. You might also want to set configuration files and such that have passwords to 600 so that nobody but yourself can read them. In general though, you want to use 644 for files and 755 for folders.

Hope that helps!
 
Status
Not open for further replies.
Top