Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-54916

core_files_zip_packer_testcase::test_list_files fails because of permissions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.0.7, 3.1.3
    • 3.0.4, 3.1, 3.2
    • Unit tests
    • MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • Hide

      # Make the files we don't want altered owned by root.  This will replicate the issue, because you aren't running your installation as root anyway. :)
      sudo chown root lib/filestorage/tests/fixtures
      sudo chown root lib/filestorage/tests/fixtures/empty.zip
      sudo chmod 444 lib/filestorage/tests/fixtures/empty.zip
       
      vendor/bin/phpunit lib/filestorage/tests/zip_packer_test.php
      

      Show
      # Make the files we don't want altered owned by root. This will replicate the issue, because you aren't running your installation as root anyway. :) sudo chown root lib/filestorage/tests/fixtures sudo chown root lib/filestorage/tests/fixtures/empty.zip sudo chmod 444 lib/filestorage/tests/fixtures/empty.zip   vendor/bin/phpunit lib/filestorage/tests/zip_packer_test.php

      If user doesn't belong to same group who created moodle branch, /lib/filestorage/tests/fixtures/empty.zip then core_files_zip_packer_testcase::test_list_files fails because of permission problem.

      1) core_files_zip_packer_testcase::test_list_files
      file_put_contents(/var/www/html/moodle/lib/filestorage/tests/fixtures/empty.zip): failed to open stream: Permission denied
       
      /var/www/html/moodle/lib/filestorage/zip_archive.php:212
      /var/www/html/moodle/lib/filestorage/zip_packer.php:548
      /var/www/html/moodle/lib/filestorage/tests/zip_packer_test.php:131
      /var/www/html/moodle/lib/phpunit/classes/advanced_testcase.php:80
      

            mr-russ Russell Smith
            rajeshtaneja Rajesh Taneja
            Rajesh Taneja Rajesh Taneja
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Dan Poltawski Dan Poltawski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.