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?

1
  • I've been experiencing the same issue...just yesterday.
    – ryanF
    Commented Jun 28, 2016 at 21:59

1 Answer 1

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.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.