XF 2.1 [E_WARNING] mkdir(): Permission denied in src/XF/Util/File.php at line 281

Jean-Baptiste

Well-known member
Hello,

I have the following error when adding a class extension :
Add_extension__Symfony_-_Admin_control_panel_2018-11-21_10-39-34.png


Here is my config :
Code:
$config['db']['host'] = '...';
$config['db']['port'] = '...';
$config['db']['username'] = '...';
$config['db']['password'] = '...';
$config['db']['dbname'] = '...';
$config['debug']=true;
$config['development']['enabled'] = true;
$config['development']['fullJs'] = true;
$config['fullUnicode'] = true;
// $config['designer']['enabled'] = true;

Best regards
 
I get the same error when trying to import a style. I set the src/addons to 777 recursively and I still get the error.
ErrorException: [E_WARNING] mkdir(): Permission denied in src/XF/Util/File.php at line 309

  1. XF::handlePhpError()
  2. mkdir() in src/XF/Util/File.php at line 309
  3. XF\Util\File::createDirectory() in src/XF/Util/File.php at line 331
  4. XF\Util\File::writeFile() in src/XF/DesignerOutput.php at line 424
  5. XF\DesignerOutput->writeSpecialFile() in src/XF/DesignerOutput/StyleProperty.php at line 97
  6. XF\DesignerOutput\StyleProperty->rebuildPropertyLessCache() in src/XF/DesignerOutput/StyleProperty.php at line 86
  7. XF\DesignerOutput\StyleProperty->XF\DesignerOutput\{closure}() in src/XF.php at line 377
  8. XF::triggerRunOnce() in src/XF/Mvc/Dispatcher.php at line 158
  9. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
  10. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2487
  11. XF\App->run() in src/XF.php at line 524
  12. XF::runApp() in admin.php at line 13
 
Hmm, my "data" and "internal_data" were already at 777. I set /styles to 777, but got the same error.

Code:
ErrorException: [E_WARNING] mkdir(): Permission denied in src/XF/Util/File.php at line 309

    XF::handlePhpError()
    mkdir() in src/XF/Util/File.php at line 309
    XF\Util\File::createDirectory() in src/XF/Util/File.php at line 331
    XF\Util\File::writeFile() in src/XF/DesignerOutput.php at line 424
    XF\DesignerOutput->writeSpecialFile() in src/XF/DesignerOutput/StyleProperty.php at line 97
    XF\DesignerOutput\StyleProperty->rebuildPropertyLessCache() in src/XF/DesignerOutput/StyleProperty.php at line 86
    XF\DesignerOutput\StyleProperty->XF\DesignerOutput\{closure}() in src/XF.php at line 377
    XF::triggerRunOnce() in src/XF/Mvc/Dispatcher.php at line 158
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2487
    XF\App->run() in src/XF.php at line 524
    XF::runApp() in admin.php at line 13

And FYI, this is the folder location that I'm changing /home/nginx/domains/forum.mysite.com/public/styles. The styles seemed to have imported -- I can select them on my website -- but I don't see them in the /home/nginx/domains/forum.mysite.com/public/styles folder.
 
Hmm, my "data" and "internal_data" were already at 777. I set /styles to 777, but got the same error.
did you only set the base directory.. or did you do it recursively for all files/folders?
Really your styles directory only needs to be read/write for either PHP process user or the HTTP user... depends on what your setup is which one.
 
Top Bottom