Failed to copy cache/upgrades/temp/ while uploading package with customisations

Hi All

I have done some customisations and tried to install via package and i get

Failed to copy cache/upgrades/temp/1Zv9lg/custom/Extension/modules/Accounts/Ext/LogicHooks/logichook.ext.php to custom/Extension/modules/Accounts/Ext/LogicHooks/logichook.ext.php.

        Can any one please suggest to fix this.

This is my manifest.php file.

<?php

$manifest = array (

  'built_in_version' => '7.6.2.1',

  'acceptable_sugar_versions' =>

  array (

    0 => '7.6.2.1',

  ),

  'acceptable_sugar_flavors' =>

  array (

    0 => 'PRO',

    1 => 'CORP',

    2 => 'ENT',

    3 => 'ULT',

  ),

  'readme' => '',

  'key' => '',

  'author' => 'Test',

  'description' => 'Test For Accounts and Leads',

  'icon' => '',

  'is_uninstallable' => true,

  'name' => 'Test For Accounts and Leads',

  'published_date' => '2016-06-20 12:20:03',

  'type' => 'module',

  'version' => 1466425206,

  'remove_tables' => 'prompt',

);

$installdefs = array (

  'id' => 'TestForAccountsandLeads',

  'relationships' =>

  array (

  ),

  'custom_fields' =>

  array (

  

  ),

  'copy' =>

  array (

    0 => array (

      'from' => '<basepath>/custom/Extension/modules/Accounts/Ext/LogicHooks/logichook.ext.php',

      'to' => 'custom/Extension/modules/Accounts/Ext/LogicHooks/logichook.ext.php',

    ),

    1 => array (

      'from' => '<basepath>/custom/modules/Accounts/VAT_hook.php',

      'to' => 'custom/modules/Accounts/VAT_hook.php',

    ),

    2 => array (

      'from' => '<basepath>/custom/modules/Accounts/clients/base/views/record/record.js',

      'to' => 'custom/modules/Accounts/clients/base/views/record/record.js',

    ),

    3 => array (

      'from' => '<basepath>/custom/modules/Accounts/clients/base/views/create-actions/create-actions.js',

      'to' => 'custom/modules/Accounts/create-actions/create-actions.js',

    ),

    4 => array (

      'from' => '<basepath>/custom/modules/Leads/clients/base/layouts/convert-panel/convert-panel.js',

      'to' => 'custom/modules/Leads/clients/base/layouts/convert-panel/convert-panel.js',

    ),

    5 => array (

      'from' => '<basepath>/custom/Extension/modules/Accounts/Ext/Vardefs/add_vat_duplicate.php',

      'to' => 'custom/Extension/modules/Accounts/Ext/Vardefs/add_vat_duplicate.php',

    ),

    6 => array (

      'from' => '<basepath>/custom/modules/Accounts/clients/base/views/dupecheck-list/dupecheck-list.php',

      'to' => 'custom/modules/Accounts/clients/base/views/dupecheck-list/dupecheck-list.php',

    ),

    7 => array (

      'from' => '<basepath>/getVatData.php',

      'to' => 'getVatData.php',

    ),

  

  ),

);

Regards

Sidhu

  • Have you already checked permissions of that files? Try to set 664 on files with chmod.

    Next you can check the owner, and try to set the user that apache use, il could be www-data, but all depends on your server environment.

    You can also upload the package and stop before install button appear, try to set 664 to files that it has to overwrite and finally install.

    sudo chmod -R 664 custom/Extension/modules/Accounts/Ext/LogicHooks/logichook.ext.php custom/modules/Accounts/VAT_hook.php custom/modules/Accounts/clients/base/views/record/record.js custom/modules/Accounts/create-actions/create-actions.js custom/modules/Leads/clients/base/layouts/convert-panel/convert-panel.js custom/Extension/modules/Accounts/Ext/Vardefs/add_vat_duplicate.php custom/modules/Accounts/clients/base/views/dupecheck-list/dupecheck-list.php getVatData.php

    Hope this can help you.

  • Hi sidhu sidhu

    In your manifest file under 'copy' => array (

    // Here all you mention path check it once

    )

    Your from path is wrong Sidhu..

    It should be <basepath>/<Main folder name>/custom/......

    you have missed <Main folder name>, this folder is where you will place all your files..

    More information check the below link

    http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.6/API/Application/Module_Loader/Packag…

    I hope it will help you

    Best Regards

    S Ramana Raju

  • In my past experience, if I had a package.zip with a custom folder inside, the <basepath> corresponds to "cache/upgrades/temp/<rand>/", so the <basepath>/custom is a correct "from" path. I have already used this structure and I hadn't problems with it.

    Check also your sugarcrm.log or your apache error log.

  • I also got the same error while uploading zip from sugarcrm moduler. Ihave checked the manifest.php and based on zip arranged the files and folders but when i upload getting the error

    and the manifest file is

    <?php

    $manifest = array (
        'acceptable_sugar_versions' => array(
            'regex_matches' => array(
                '^7.5\\..+',
                '^7.6\\..+',
                '^7.7\\..+',
                '^7.8\\..+',
                '^7.9\\..+',
                '^8.0\\..+',
                '^8.1\\..+',
                '^8.2\\..+',
                '^8.3\\..+',
            )
        ),
        'acceptable_sugar_flavors' => array(
            0 => 'PRO',
            1 => 'CORP',
            2 => 'ENT',
            3 => 'ULT'
        ),
      'readme' => '',
      'key' => 1410796385,
      'author' => 'SugarCRM Developer Support',
      'description' => 'Work log field for Sugar',
      'icon' => '',
      'is_uninstallable' => true,
      'name' => 'SugarField Work Log Field',
      'published_date' => '2018-11-30 00:00:00',
      'type' => 'module',
      'version' => '2.6.3',
      'remove_tables' => '',
    );

    $installdefs = array (
      'id' => 1410796385,
      'copy' =>
      array (
        0 =>
        array (
          'from' => '<basepath>/copy/custom/Extension/application/Ext/Language/en_us.worklog.php',
          'to' => 'custom/Extension/application/Ext/Language/en_us.worklog.php',
        ),
        1 =>
        array (
          'from' => '<basepath>/copy/custom/Extension/modules/DynamicFields/Ext/Language/en_us.worklog.php',
          'to' => 'custom/Extension/modules/DynamicFields/Ext/Language/en_us.worklog.php',
        ),
        2 =>
        array (
          'from' => '<basepath>/copy/custom/Extension/modules/ModuleBuilder/Ext/Language/en_us.worklog.php',
          'to' => 'custom/Extension/modules/ModuleBuilder/Ext/Language/en_us.worklog.php',
        ),
        3 =>
        array (
          'from' => '<basepath>/copy/custom/clients/base/fields/worklog/detail.hbs',
          'to' => 'custom/clients/base/fields/worklog/detail.hbs',
        ),
        4 =>
        array (
          'from' => '<basepath>/copy/custom/clients/base/fields/worklog/disabled.hbs',
          'to' => 'custom/clients/base/fields/worklog/disabled.hbs',
        ),
        5 =>
        array (
          'from' => '<basepath>/copy/custom/clients/base/fields/worklog/edit.hbs',
          'to' => 'custom/clients/base/fields/worklog/edit.hbs',
        ),
        6 =>
        array (
          'from' => '<basepath>/copy/custom/clients/base/fields/worklog/list.hbs',
          'to' => 'custom/clients/base/fields/worklog/list.hbs',
        ),
        7 =>
        array (
          'from' => '<basepath>/copy/custom/clients/base/fields/worklog/readme.txt',
          'to' => 'custom/clients/base/fields/worklog/readme.txt',
        ),
        8 =>
        array (
          'from' => '<basepath>/copy/custom/clients/base/fields/worklog/worklog.js',
          'to' => 'custom/clients/base/fields/worklog/worklog.js',
        ),
        9 =>
        array (
          'from' => '<basepath>/copy/custom/clients/base/filters/operators/worklog.php',
          'to' => 'custom/clients/base/filters/operators/worklog.php',
        ),
        10 =>
        array (
          'from' => '<basepath>/copy/custom/include/SugarFields/Fields/Worklog/ClassicEditView.tpl',
          'to' => 'custom/include/SugarFields/Fields/Worklog/ClassicEditView.tpl',
        ),
        11 =>
        array (
          'from' => '<basepath>/copy/custom/include/SugarFields/Fields/Worklog/DetailView.tpl',
          'to' => 'custom/include/SugarFields/Fields/Worklog/DetailView.tpl',
        ),
        12 =>
        array (
          'from' => '<basepath>/copy/custom/include/SugarFields/Fields/Worklog/EditView.tpl',
          'to' => 'custom/include/SugarFields/Fields/Worklog/EditView.tpl',
        ),
        13 =>
        array (
          'from' => '<basepath>/copy/custom/include/SugarFields/Fields/Worklog/SugarFieldWorklog.php',
          'to' => 'custom/include/SugarFields/Fields/Worklog/SugarFieldWorklog.php',
        ),
        14 =>
        array (
          'from' => '<basepath>/copy/custom/include/SugarFields/Fields/Worklog/SugarFieldWorklogHelpers.php',
          'to' => 'custom/include/SugarFields/Fields/Worklog/SugarFieldWorklogHelpers.php',
        ),
        15 =>
        array (
          'from' => '<basepath>/copy/custom/include/SugarFields/Fields/Worklog/WirelessDetailView.tpl',
          'to' => 'custom/include/SugarFields/Fields/Worklog/WirelessDetailView.tpl',
        ),
        16 =>
        array (
          'from' => '<basepath>/copy/custom/include/SugarFields/Fields/Worklog/WirelessEditView.tpl',
          'to' => 'custom/include/SugarFields/Fields/Worklog/WirelessEditView.tpl',
        ),
        17 =>
        array (
          'from' => '<basepath>/copy/custom/include/generic/SugarWidgets/SugarWidgetFieldWorklog.php',
          'to' => 'custom/include/generic/SugarWidgets/SugarWidgetFieldworklog.php',
        ),
        18 =>
        array (
          'from' => '<basepath>/copy/custom/modules/DynamicFields/templates/Fields/Forms/worklog.php',
          'to' => 'custom/modules/DynamicFields/templates/Fields/Forms/worklog.php',
        ),
        19 =>
        array (
          'from' => '<basepath>/copy/custom/modules/DynamicFields/templates/Fields/Forms/worklog.tpl',
          'to' => 'custom/modules/DynamicFields/templates/Fields/Forms/worklog.tpl',
        ),
        20 =>
        array (
          'from' => '<basepath>/copy/custom/modules/DynamicFields/templates/Fields/TemplateWorklog.php',
          'to' => 'custom/modules/DynamicFields/templates/Fields/TemplateWorklog.php',
        ),
        21 =>
        array (
          'from' => '<basepath>/copy/custom/vendor/Smarty/plugins/function.convert_worklog.php',
          'to' => 'custom/vendor/Smarty/plugins/function.convert_worklog.php',
        ),
        22 =>
        array (
          'from' => '<basepath>/copy/custom/include/SugarFields/Fields/Worklog/ListView.tpl',
          'to' => 'custom/include/SugarFields/Fields/Worklog/ListView.tpl',
        ),
        23 =>
        array (
          'from' => '<basepath>/copy/custom/Extension/application/Ext/Console/RegisterWorklogCommands.php',
          'to' => 'custom/Extension/application/Ext/Console/RegisterWorklogCommands.php',
        ),
        24 =>
        array (
          'from' => '<basepath>/copy/custom/src/Worklog/Console/Command/Migrate.php',
          'to' => 'custom/src/Worklog/Console/Command/Migrate.php',
        ),
      ),
      'post_execute' =>
      array (
        0 => '<basepath>/post_execute/0.php',
      ),
      'post_uninstall' =>
      array (
        0 => '<basepath>/post_uninstall/0.php',
      ),
    );

    ?>

    As per path i have arranged the folders and fields but still getting error