Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-23449

Improve stash cache default permissions

    XMLWordPrintable

Details

    Description

      Stash caches by default only allow read/write access to file's 'owner' and 'group', but not 'other' (660 and 770 octal permissions).

      This behavior can be manually modified, for example, using the following settings:

      stash:
          caches:
              default:
                  handlers:
                      - FileSystem
                  inMemory: true
                  registerDoctrineAdapter: false
                  FileSystem:
                      filePermissions: 666
                      dirPermissions: 777
      

      However, this does not follow the same behavior as other caches, such as http/twig/etc:
      For these, PHP's umask() is used instead, which allows following the server/vhost configuration, as well as modifying behavior on application-level:

      See also: http://symfony.com/doc/current/book/installation.html

      If you don't have access to changing the ACL of the directories, you will need to change the umask so that the cache and log directories will be group-writable or world-writable (depending if the web server user and the command line user are in the same group or not). To achieve this, put the following line at the beginning of the app/console, web/app.php and web/app_dev.php files:

      umask(0002); // This will let the permissions be 0775
      
      // or
      
      umask(0000); // This will let the permissions be 0777
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            joao.inacio-obsolete@ez.no Joao Inacio (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: