I have created a custom customer attribute (profile_image) when I display it in the profile page it throws error

Forbidden You don't have permission to access /media/customer/1/0/100876954-Untitled-2.240x240.jpg on this server. Apache/2.2.15 (CentOS) Server at Port 1208

but this media folder have the 0777 permission.

and the error log have mention the following error

lient denied by server configuration: /home/vhosts/FederalLawyer/app/etc/local.xml

  • Did you also check file permissions for the subfolder (/media/customer/...)? May 20, 2015 at 11:56
  • 1
    i checked with this case and it have 0777 permission .
    – senthil
    May 20, 2015 at 13:21
  • please check .htaccess in media folder also. It helps some one Jan 27, 2017 at 9:54

1 Answer 1

  • /www/vendor/colinmollenhour/cache-backend-file/File.php

Line 50+-

'directory_mode' => 0755,         
'file_mode' => 0644,  
  • /www/vendor/magento/framework/Filesystem/DriverInterface.php

Line 20+-


 * Permissions to give read/write access to owner and owning group, but not to all users
  • SSH magento root

    find . -type d -exec chmod 755 {} \;

    find . -type f -exec chmod 644 {} \;

  • clear var folder

  • run setup:upgrade
  • run static-content:deploy

Sorry for the fast answer , not much time atm but this works for me. Also i have no idea if this is even a good answer security wise but its what my host recommends

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.