Module Loader: File outside basedir

Hello,

I am getting a blank screen when I try to upload a package using module loader and am a bit stuck. Looking in the sugarcrm.log I am finding this: 

Thu Sep 15 10:16:27 2016 [53959][1][FATAL] Exception in Controller: exception 'RuntimeException' with message 'File name violation: file outside basedir' in /Library/Server/Web/Data/Sites/CustomSitesDefault/sugarcrm/src/Util/Files/FileLoader.php:65

Stack trace:

#0 /Library/Server/Web/Data/Sites/CustomSitesDefault/sugarcrm/ModuleInstall/ModuleScanner.php(863): Sugarcrm\Sugarcrm\Util\Files\FileLoader::validateFilePath('/private/var/tm...', true)

#1 /Library/Server/Web/Data/Sites/CustomSitesDefault/sugarcrm/modules/Administration/UpgradeWizard.php(134): MSLoadManifest('/private/var/tm...')

#2 /Library/Server/Web/Data/Sites/CustomSitesDefault/sugarcrm/include/MVC/View/SugarView.php(526): require_once('/Library/Server...')

#3 /Library/Server/Web/Data/Sites/CustomSitesDefault/sugarcrm/include/MVC/View/views/view.classic.php(45): SugarView->includeClassicFile('modules/Adminis...')

#4 /Library/Server/Web/Data/Sites/CustomSitesDefault/sugarcrm/include/MVC/View/SugarView.php(160): ViewClassic->display(Array)

#5 /Library/Server/Web/Data/Sites/CustomSitesDefault/sugarcrm/include/MVC/Controller/SugarController.php(362): SugarView->process(Array)

#6 /Library/Server/Web/Data/Sites/CustomSitesDefault/sugarcrm/include/MVC/Controller/SugarController.php(310): SugarController->processView()

#7 /Library/Server/Web/Data/Sites/CustomSitesDefault/sugarcrm/include/MVC/SugarApplication.php(185): SugarController->execute()

#8 /Library/Server/Web/Data/Sites/CustomSitesDefault/sugarcrm/index.php(27): SugarApplication->execute()

#9 {main}

 

I added a log in UpgardeWizard.php to see where the file in question was located:

Thu Sep 15 10:16:27 2016 [53959][1][FATAL] File : /private/var/tmp/nNoCnH/manifest.php

 

My first thought was permissions and I have reset those with no luck.

 

This is 7.7.1.1 on a MAMP environment. 

Parents Reply
  • I have the same issue on xamp.

    I did following steps to got it working.

    1. Open C:\xampp\htdocs\crm\ModuleInstall\ModuleScanner.php in the function 

    function MSLoadManifest($manifest_file) add the line
    $GLOBALS['log']->fatal("manifest_file: $manifest_file"); in start of function.
    Now try to upload package from module loader.
    It gave me the path of the tmp directory where manifest of package is unzipped in the sugarcrm log file.
    e.g. path is:
    C:\Users\userabc\AppData\Local\Temp\11111.tmp/manifest.php
    2. Now copy the path "C:\Users\userabc\AppData\Local\Temp" and put/change it in php.ini e.g
    upload_tmp_dir="C:\Users\userabc\AppData\Local\Temp"

    Restarted the xamp server. 

    Now try to upload the package.

    And all got working.

    In case some body have this issue on windows.

    Regards,

    Usman

Children
No Data