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

DFS file permissions are ignored

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: High High
    • Customer request
    • 2.5.2
    • Platform > IO
    • None

    Description

      It seems that IO permissions for files and directories are ignored when DFS is configured.

      Steps to reproduce:
      1. Create a new installation of eZ Platform. Make sure that proper RewriteRule was enabled, ref: https://doc.ezplatform.com/en/latest/guide/clustering/#web-server-rewrite-rules.
      2. Enable DFS using the configuration below:

      dfs.yml
       # new doctrine connection for the dfs legacy_dfs_cluster metadata handler.
       doctrine:
           dbal:
               connections:
                   dfs:
                       driver: pdo_mysql
                        host: localhost
                        port: null
                        user: <your_user>
                        password: <your_password>
                        dbname: <database_name>
                        charset: utf8mb4
       
       # define the flysystem handler
       oneup_flysystem:
           adapters:
               nfs_adapter:
                   local:
                       directory: "/some_directory/outside/project"
       
       # define the ez handlers
       ez_io:
           binarydata_handlers:
               nfs:
                   flysystem:
                       adapter: nfs_adapter
           metadata_handlers:
               dfs:
                   legacy_dfs_cluster:
                       connection: doctrine.dbal.dfs_connection
       
       # set the application handlers
       ezpublish:
           system:
               default:
                   io:
                       metadata_handler: dfs
                       binarydata_handler: nfs
                       permissions:
                           files: 0777
                           directories: 0777
      
      

      3. Make sure that dfs.yml file is loaded e.g. in config.yml:

       imports:
       - { resource: dfs/dfs.yml }

      4. Login to Back Office and add a new image.
      5. Go to the directory where the file is stored.
      6. Take a look at the permissions for the file.

      Result:
      The file was created with the following permissions:
      0644 which stands for rw-rr-
      Expected result:
      the file should be created with 0777 / rwxrwxrwx permissions.

      Attachments

        Activity

          People

            Unassigned Unassigned
            konrad.oboza@ibexa.co Konrad Oboza
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: