I installed magento 2 in amazon linux(centos) successfully. After doing styling and deploying, product images are not loaded. Add to cart is not working. it redirects to cart page without adding any item. There is knockout js issue

enter image description here


ReferenceError: customer is not defined path.../en_US/knockoutjs/knockout.js line 2624 > Function Line 1

I copied this installation and installed in my windows 10 machine, it works fine. There is no js issue.

========================Update 1====================================

I followed this document.

I suspect that I have permission issue in the server. my root folder permission

enter image description here

Inner folder permissions

enter image description here

var folder permission

enter image description here

pub folder permission

enter image description here

=======================Update 2==================================

I have executed command and attached screenshot herewith.

sudo chown -R ec2-user:apache var

suod chmod -R 777 var

enter image description here

Is there anyone who has this kind of experience will be helpful to solve this problem.


  • permission issue? – Shyam Krishna Sreekumar Oct 27 '16 at 9:08
  • Yes. It seems permission issue. Updated the question with screen shots. Please check. – cha Oct 27 '16 at 9:13
  • 1
    Please change the user:group permission of var folder recursively. From the csreenshot given above, Both the user and group created are both apache but the parent folder is having the ownership of ec2user. Please give the ec2-user ownership for user in var folder and test this. Go to the doc-root of the website and execute the following commands and please share the screenshot. chown -R ec2-user:apache var Above will change the user:group ownership Also chmod -R 777 var And test this. – Shyam Krishna Sreekumar Oct 27 '16 at 9:37
  • @ShyamKrishnaSreekumar Updated the question – cha Oct 27 '16 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.