About chmod issue

Hi @tomzol,

The following 2 commands (as you mentioned) would normally work for an issue like the one you’ve described:

Reset Ownership and Group:
Run from any directory as superuser

sudo chown -R magento:www-data /var/www/html/

Reset Folder and File Permissions:
Run from Magento root directory as magento user

find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && chmod u+x bin/magento

So let’s dig a little deeper into the following error:

“Warning: mkdir(): Permission denied in /var/www/html/app/code/MageBig/MbFrame/Controller/Adminhtml/Theme/Save.php on line 265”

This would suggest that either the Ownership, Group or File Permissions are incorrect. Therefore when Magento tries to make a new directory, it can’t. But obviously that shouldn’t be the case as you’ve already reset those with the above commands.

Apparently, on line 265 there is a command being executed (probably make directory). This gives us 2 things to go on.

First, you should see what the code is for line 265 of the Save.php file. This can be done by opening the Save.php file in nano and jumping to line 256:

  • nano app/code/MageBig/MbFrame/Controller/Adminhtml/Theme/Save.php
  • Then press Ctrl+_ (Control & Underscore) and type 256 to jump to that line number
  • Let me know what’s written on that line

Second, you should check the var/logs/system.log file, as this might provide further information to go on:

  • nano var/log/system.log
  • Then press Ctrl+_ (Control & Underscore)
  • Then press Ctrl+V (Control & V)
  • Then use Page Up to find the error (if it exists) here
  • Let me know what you find