Appendix—Magento file system ownership and appendix (legacy)

Overview: Magento file system ownership and appendix (legacy)

This topic is provided for convenience for anyone using Magento Open Source or Magento Commerce versions 2.0.0–2.0.5.

In versions before 2.0.6, Magento explicitly set file system permissions when we created files, such as cache and static view files. Starting with 2.0.6, we do not set permissions explicitly. For more detail about file system ownership and permissions for version 2.0.6 and later, see Overview of ownership and permissions.

Summary of file system permissions

This section summarizes the permissions Magento uses when creating files in the file system.

Developer mode permissions

In developer mode, Magento sets permissions as follows:

Directories: 770

770 permissions give full control to the owner and to the group, and no permissions to anyone else.

Files: 660

660 permissions give read-write permissions to the owner and to the group, and no permissions to anyone else.

Production mode permissions

Changing modes affects permissions and ownership the following subdirectories in your Magento installation:

var/view_preprocessed
var/generation
var/di

When you change to production mode, we set the following permissions on these directories and subdirectories:

Directories: 750

750 permissions give full control to the owner, read and execute permissions to the group, and no permissions to anyone else.

Files: 640

640 permissions give read-write permissions to the owner, read-only permissions to the group, and no permissions to anyone else.