You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: src/guides/v2.3/install-gde/prereq/file-sys-perms-over.md
+53-1
Original file line number
Diff line number
Diff line change
@@ -6,4 +6,56 @@ functional_areas:
6
6
- Setup
7
7
---
8
8
9
-
{% include install/file-system-umask-over.md %}
9
+
It is important to secure your Magento installation in a development environment to help prevent issues related to unauthorized people or processes accessing—and potentially harming—your system. Use the following file system ownership and permissions guidelines to protect your installation.
10
+
11
+
## Magento file system owner
12
+
13
+
The Magento file system owner is a user that owns and holds write permissions to files in the Magento file system.
14
+
15
+
There are two types of Magento file system owners:
16
+
17
+
-**Shared hosting with a single user**
18
+
19
+
Shared hosting providers enable you to log in to the Magento server as one user. As a single user, you can log in, transfer files using FTP, and run the web server. You have the option of setting a [`umask`](#restrict) to further restrict access, particularly in a production environment.
20
+
21
+
-**Private hosting with two users**
22
+
23
+
Private hosting is useful if you manage a Magento server. Each user has a specific responsibility:
24
+
25
+
- The _web server user_ runs the Magento Admin and storefront.
26
+
27
+
- The _command-line user_ runs the Magento cron jobs and command-line utilities.
28
+
29
+
Both users require the same level of permissions to the Magento file system, so it is best to use a [shared group][] and set a [`umask`](#restrict).
30
+
31
+
### Restrict access with a umask {#restrict}
32
+
33
+
To tighten security, particularly in a production environment on a shared hosting system, you can use `umask` to restrict access. A `umask`—also referred to as a _file system creation mask_—is a set of bits that controls how the file permissions are set for newly created files.
34
+
35
+
{:.bs-callout-warning}
36
+
File system security is complex and extremely important. We strongly recommend that you consult an experienced system administrator or network administrator before you decide the level of permissions to set. We provide a mechanism for you to use, but creating a permissions strategy is your responsibility.
37
+
38
+
Magento uses a three-bit, default mask: `002`. Subtract the Magento default mask from the UNIX defaults of 666 for files and 777 for directories.
39
+
40
+
For example:
41
+
42
+
-**775 for directories**—Full control by the user, full control by the group, and enables everyone to traverse the directory. These permissions are typically required by shared hosting providers.
43
+
44
+
-**664 for files**—Writable by the user, writable by the group, and read-only for everyone else.
45
+
46
+
For more information about creating a `magento_umask` file, see [Optionally set a umask]({{ page.baseurl }}/install-gde/install/post-install-umask.html).
47
+
48
+
## Permissions, ownership, and Magento modes
49
+
50
+
We recommend different permissions and ownership when you use the different Magento modes: default mode, developer mode, and production mode. See [About Magento modes][modes] in the _Configuration guide_.
51
+
52
+
We further discuss permissions recommendations in [File systems access permissions][config-file-access] in the _Configuration guide_.
53
+
54
+
{:.bs-callout-tip}
55
+
Before you install the Magento software, review [Set pre-installation ownership and permissions]({{ page.baseurl }}/install-gde/prereq/file-system-perms.html).
0 commit comments