Libbna / CUSTOM-CMS

The purpose of this project is to build a small Content Management System (CMS) like Drupal and its mainly focused on creating blogging sites.
6 stars 8 forks source link

Getting permission error while uploading a logo #243

Open vbadkar opened 2 years ago

vbadkar commented 2 years ago

Expected Behaviour :- The image and other data should get stored in the database with out any error.

Error log :- [Wed Jan 19 09:59:17.698575 2022] [php7:error] [pid 339505] [client ::1:33134] PHP Fatal error: Uncaught Intervention\Image\Exception\NotWritableException: Can't write image data to path (assets/images/logo/resized_thewire-favicon.png) in /var/www/html/CUSTOM-CMS/vendor/intervention/image/src/Intervention/Image/Image.php:150\nStack trace:\n#0 /var/www/html/CUSTOM-CMS/src/Models/AdminModel.php(108): Intervention\Image\Image->save()\n#1 /var/www/html/CUSTOM-CMS/src/Controllers/Admin.php(140): Cms\Models\AdminModel->updateLogo()\n#2 /var/www/html/CUSTOM-CMS/load_routes.php(40): Cms\Controllers\Admin->configDetails()\n#3 {main}\n thrown in /var/www/html/CUSTOM-CMS/vendor/intervention/image/src/Intervention/Image/Image.php on line 150, referer: http://localhost/CUSTOM-CMS/config-form

Work-around :- Need to give chmod 777 permission to the asstes/images folder, it is observed that we need to give permission every time this error is displayed

Technical Implementation :- TBD(if a solution is found then update it here and change the status to ready & assign it to yourself)

JayKandari commented 2 years ago

@vbadkar : can you add the steps to reproduce for this bug ? so that others can also reproduce the same and thus suggest a solution.