How To Set The File Rights

Table of contents:

How To Set The File Rights
How To Set The File Rights

Video: How To Set The File Rights

Video: How To Set The File Rights
Video: How to Change File Permissions in Windows 10 2024, May
Anonim

Each time a file is accessed on the server, the software determines the rights of the person requesting the file. If the request comes from a user from the group that is not allowed to do this with the requested file, the server issues an error message. If you have access to the file settings, then you can set permissions for them using the appropriate programs.

How to set the file rights
How to set the file rights

Instructions

Step 1

Determine exactly what rights you want to give the file. On UNIX systems, which are now used on most web servers, users are divided into three groups. One of them (user) belongs to the owner of the file or folder, to the other (group) - a user belonging to the group, which includes the owner, and all the rest are assigned to the third group (world). For each file, it must be defined, the user from which group can perform write, read or execute operations with it (if the file is executable). At this step, you need to determine which set of rights should be assigned to each of the groups.

Step 2

Encode the compiled set of rights. The code must contain three digits, of which the first belongs to the user group, the second to the group group, and the third to the world group. Each of these digits is found by adding the codes of the corresponding operations: read operation corresponds to code 4, write operation - code 2, execute operation - code 1. For example, if the user group (the first number in the set of rights) needs give permission to write and execute this file, the number will be 3 (2 + 1 = 3). In the same way, the second and third numbers are determined - the rights for the groups group and world, respectively. For example, the highest permissions for all three groups would be set by assigning permissions code 777 to the file.

Step 3

Use, for example, FTP-client to set the necessary rights to files on the server. To do this, you need to connect to your FTP-server, find and select the required file on it, right-click it and select the setting rights command from the context menu. In the window that opens, most programs of this kind offer two ways to specify a set of rights - a table with a set of checkboxes and a field for entering a code. With the help of checkboxes, you can perform the operation of encoding the rights described in the previous step, and in the input field you must enter a ready-made value (for example, 777). By pressing the "OK" button, the program will send the chmod command (short for CHange MODe) to the server with the appropriate parameters, and the server software will set the specified rights to the specified file.

Recommended: