cancel
Showing results for 
Search instead for 
Did you mean: 

php bin/magento setup:upgrade, could not open input file:magento

SOLVED

php bin/magento setup:upgrade, could not open input file:magento

When executing command from Magento root folder home/magento_ftp/www/:

php bin/magento setup:upgrade

error returns;

Could not open input file:magento

 

Magento 2.2.3 is on a Varnix server and /var folder has 777 permissions on the magento file owner. Also running magento setup:upgrade from within the bin does not work. Also tried to delete all files in /var. 

magento file exists in /bin folder.

How can I see which prevents magento from running setup:upgrade?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: php bin/magento setup:upgrade, could not open input file:magento

Hello @infoscanto 

 

It seems that bin/magento file doesn't have the right permissions. Please give permission and try again.

chmod u+x bin/magento

or

sudo chmod -R 0777 bin/magento
Manish Mittal
https://www.manishmittal.com/

View solution in original post

3 REPLIES 3

Re: php bin/magento setup:upgrade, could not open input file:magento

Hi @infoscanto,

It seems permissions issue.

Execute the following command for permission once and check.

find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \; && chmod u+x bin/magento

You can use sudo as well if you have sudo user.

sudo find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \; && chmod u+x bin/magento

I hope it will help you.

Re: php bin/magento setup:upgrade, could not open input file:magento

Hello @infoscanto 

 

It seems that bin/magento file doesn't have the right permissions. Please give permission and try again.

chmod u+x bin/magento

or

sudo chmod -R 0777 bin/magento
Manish Mittal
https://www.manishmittal.com/

Re: php bin/magento setup:upgrade, could not open input file:magento

I have tried your solution but it does not work for me as it shows me this error 

SQLSTATE[HY000] [2002] No such file or director

when I type 

 

sudo bin/magento setup:upgrade

Thanks in advance