5

I'm working with Magento 2.1. I have a magento_umask file that contains the following

#File: magento_umask
000

That's a mask of 000, which should give users, groups, and all-users/world write permissions to fils. However, with this umask in place, Magento is generating cache files with the following permissions when run from the command line.

-rw-rw----  1 alanstorm  staff  508 Jun 28 10:52 /Users/alanstorm/Sites/magento-2-1-0.dev/project-community-edition/var/cache//mage-tags/mage---b3e_CONFIG

That is -- users and groups have read/write, but all-users/world have none.

Where does Magento's cache generating code change the permissions and/or override the explicit umask I've set?

Alana Storm
  • 44,345
  • 35
  • 168
  • 353

1 Answers1

1

Magento by default uses Cm_Cache_Backend_File cache backend. And by default it uses 0770 for directory and 0660 for files.

See https://github.com/colinmollenhour/Cm_Cache_Backend_File/blob/master/File.php#L50

It is way file created with this permissions.

I propose to create the issue because for me it looks like a bug.

KAndy
  • 20,811
  • 3
  • 49
  • 59