Why, after uploading a correctly configured website to hosting, errors with codes 403 or 500 can be displayed? The reason may be incorrect rights to files and / or folders on the site.
Incorrect permissions can be set when transferring files from another hosting server or while downloading files from a local computer.
What access rights should you use and why?
Usually, for your site to work correctly, you should use the following rights:
- for folders — 755,
- for files — 644.
Access rights 644 assume the following privileges:
- the owner of the file can read and edit the file,
- the user group to which the owner of the file belongs can only read the file,
- other users can also only read the file.
Access rights 755 imply such privileges:
- the owner of the folder can edit the contents of the folder, read or enter the folder,
- the user group to which the folder owner belongs can read-only and log on to the folder,
- other users can read-only and log into the folder.
In the case of using such rights, the site owner can freely work with the configuration and use of the site. At the same time, security measures are taken to prevent other users from changing the contents of files and folders.
Oleksii Momot
Comments