How To Set File Permissions

Table of contents:

How To Set File Permissions
How To Set File Permissions

Video: How To Set File Permissions

Video: How To Set File Permissions
Video: How to Change File Permissions in Windows 10 2024, April
Anonim

Many years ago there was such a concept as "property right". Unfortunately, in the modern world it is becoming increasingly difficult to enforce such rights. This problem is especially acute with various documents posted on the Internet. To avoid unpleasant situations, you need to know how to set file permissions.

How to set file permissions
How to set file permissions

Instructions

Step 1

Very often, website builders only focus on scripting. At the same time, they completely forget about the chmod function, which allows you to assign access rights to a particular file located on the server. This is provided for the purpose of protecting them from unauthorized access, copying, hacking, etc. the entire action is called change file mode and is translated as "changing the file mode".

Step 2

Remember the three categories into which you can divide all users: the owner of the file, who has all the rights; his group, which has a limited number of rights; ordinary users who are only allowed to open this document.

Step 3

To set the rights to a particular file, start any ftp client (for example, CuteFTP). Right-click and select the "Change file attributes" menu item.

Step 4

After the installation window opens, place the checkboxes according to your wishes. In most cases, you will see three lines that correspond to the above three user categories. It is recommended to set the following settings:

File owner: read, write, execute (rwx);

His group: read, execute (rx);

Regular users: read, execute (rx).

Step 5

As a result, the file receives the following permissions characteristic: rwxrxrx. This means that only the owner of the file can modify and delete the file.

Step 6

More advanced users should pay attention to the Manual field. Here you can also adjust the access rights. And this is done manually: the numeric code that corresponds to the desired rights is simply summed up:

the owner has the right to read - 400;

the owner has the right to write - 200;

the owner has the right to execute - 100;

the group has the right to read - 40;

the group has the right to record - 20;

the group has the right to execute - 10;

the rest have the right to read - 4;

the rest have the right to write - 2;

the rest have the right to execute - 1.

Recommended: