0

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 192.168.1.243 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/...)? – Anna Völkl May 20 '15 at 11:56
  • 1
    i checked with this case and it have 0777 permission . – senthil May 20 '15 at 13:21
  • please check .htaccess in media folder also. It helps some one – Jalpesh Patel Jan 27 '17 at 9:54
0
  • /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+-

const WRITEABLE_DIRECTORY_MODE = 0755;

/**
 * Permissions to give read/write access to owner and owning group, but not to all users
 */
const WRITEABLE_FILE_MODE = 0644;
  • 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, privacy policy and cookie policy

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