XF 2.3 Unable to build master data

While trying to rebuild master data by visiting /install/ I keep getting an error.

ErrorException: [E_WARNING] file_put_contents(/var/www/html/data/local/icons/brands.svg): Failed to open stream: Permission denied in src/vendor/league/flysystem/src/Adapter/Local.php at line 199
  1. XF::handlePhpError()
  2. file_put_contents() in src/vendor/league/flysystem/src/Adapter/Local.php at line 199
  3. League\Flysystem\Adapter\Local->update() in src/vendor/league/flysystem/src/Filesystem.php at line 99
  4. League\Flysystem\Filesystem->put() in src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php at line 430
  5. League\Flysystem\EventableFilesystem\EventableFilesystem->callFilesystemMethod() in src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php at line 395
  6. League\Flysystem\EventableFilesystem\EventableFilesystem->delegateMethodCall() in src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php at line 57
  7. League\Flysystem\EventableFilesystem\EventableFilesystem->put() in src/vendor/league/flysystem/src/MountManager.php at line 597
  8. League\Flysystem\MountManager->put() in src/XF/Util/File.php at line 238
  9. XF\Util\File::writeToAbstractedPath() in src/XF/Service/Icon/SpriteGeneratorService.php at line 82
  10. XF\Service\Icon\SpriteGeneratorService->generateForVariant() in src/XF/Service/Icon/SpriteGeneratorService.php at line 54
  11. XF\Service\Icon\SpriteGeneratorService->generate() in src/XF/Repository/IconRepository.php at line 276
  12. XF\Repository\IconRepository->runSpriteGenerator() in src/XF/Job/IconUsage.php at line 57
  13. XF\Job\IconUsage->run() in src/XF/Job/Atomic.php at line 40
  14. XF\Job\Atomic->run() in src/XF/Job/Manager.php at line 275
  15. XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 205
  16. XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 156
  17. XF\Job\Manager->runUnique() in src/XF/Install/Controller/AbstractController.php at line 32
  18. XF\Install\Controller\AbstractController->manualJobRunner() in src/XF/Install/Controller/Upgrade.php at line 279
  19. XF\Install\Controller\Upgrade->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 362
  20. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
  21. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
  22. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
  23. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2826
  24. XF\App->run() in src/XF.php at line 806
  25. XF::runApp() in install/index.php at line 16
I have confirmed the data directory and all sub directories are 777, however, it looks like that they are overwritten and changed. One difference is I am using the S3 storage for data/ and internal_data/ via the config.php file.

$config['fsAdapters']['data'] = function() use($s3)
{
return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 's3bucket', 'data');
};

$config['fsAdapters']['internal-data'] = function() use($s3)
{
return new \League\Flysystem\AwsS3v3\AwsS3Adapter($s3(), 's3bucket', 'internal_data');
};

$config['externalDataUrl'] = function($externalPath, $canonical)
{
return 'https://<cloudfront>.cloudfront.net/data/' . $externalPath;
};
 
Local data is always writen to disk, no matter which Flysstem-Adapter you use for data / internal-data.

As stated in the error message, check file sytem permissions - they don't seem to be correct (and 777 is never correct anyway).
 
Last edited:
Local data is always writen to disk, no matter which Flysstem-Adapter you use for data / internal-data.

As statedin the error message, check file sytem permissions - they don't seem to be correct (and 777 is never correct anyway).
I did look at it looks like the permissions for those individual files are 644. However, if I change them, the install script overwrites them, then still shows that error message. I was going based off the permissions that were started when I first did the install and what Paul B said here https://xenforo.com/community/threa...tem-src-adapter-local-php-at-line-199.188650/
 
Back
Top Bottom