Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-11076

file permissions issue when running regen.sh

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 4.3.0
    • Fix Version/s: None
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      When running bin/regen.sh I got the following error:
      ...
      Starting data generation on October 17th 05:24:20 PM
      PHP Warning: file_put_contents(/Users/josephmurray/GoogleDrive/Sites/civiaccounts/sites/default/files/civicrm/upload/.htaccess): failed to open stream: Permission denied in /Users/josephmurray/GoogleDrive/Sites/civicrm/trunk.civiaccounts/CRM/Utils/File.php on line 394
      We could not write /Users/josephmurray/GoogleDrive/Sites/civiaccounts/sites/default/files/civicrm/upload/.htaccess. Have you moved your site directory or server?<p>Please fix the setting by running the <a href="http://civiaccounts/index.php?q=civicrm/admin/setting/updateConfigBackend&reset=1">update config script</a>Database "civiaccounts_civ" dropped
      ...

      The problem is that the file in question is created by the Apache user account and thus is not writeable by other users. While regen.sh is used on development machines, I think this security setup is not that unusual.

      $ ls -al /Users/josephmurray/GoogleDrive/Sites/civiaccounts/sites/default/files/civicrm/upload/
      total 16
      drwxr-xr-x 4 _www staff 136 24 Sep 11:14 .
      drwxr-xr-x 7 _www staff 238 24 Sep 02:53 ..
      rw-rr- 1 _www staff 56 7 Oct 08:40 .htaccess
      rw-rr- 1 _www staff 6 9 Oct 10:25 latest-version-cache.txt

      Workaround is easy:
      $ sudo chmod 777 /Users/josephmurray/GoogleDrive/Sites/civiaccounts/sites/default/files/civicrm/upload/.htaccess

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              joemurray Joe Murray
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: