0

Hello yesterday i transfered my store to new server (Ubuntu 18).
After clean installion of Magento i want to run via cli command for the backup but i takes this message
-bash: bin/magento: Permission denied
Any suggest?

  • from root of your magento project, run this command sudo chmod -R 0777 bin – Nalin Savaliya Sep 16 '18 at 12:14
  • i get this now Deprecated Functionality: The each() function is deprecated. This message will b e suppressed on further calls in /var/www/vhosts/store/httpdocs/vendor/co linmollenhour/cache-backend-file/File.php on line 81 – darkattack Sep 16 '18 at 13:11
  • well my php in cli set 7.2 in setting i have 7.0 prntscr.com/kv0aw5 prntscr.com/kv0b5c – darkattack Sep 16 '18 at 13:11
1

As the comment above suggests, it sounds like the permissions aren't set correctly or the ownership is wrong.

To make sure the files are owned by the correct user, cd into the magento root directory and run chown youruser:youruser . -R

For file and directory permissions, from the magento root directory you can run the following;

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

  • worked!!! but i get this now Deprecated Functionality: The each() function is deprecated. This message will b e suppressed on further calls in /var/www/vhosts/store/httpdocs/vendor/co linmollenhour/cache-backend-file/File.php on line 81 – darkattack Sep 16 '18 at 13:04
  • well my php in cli set 7.2 in setting i have 7.0 prntscr.com/kv0aw5 prntscr.com/kv0b5c – darkattack Sep 16 '18 at 13:11
  • btw after this find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \; && chmod u+x bin/magento blank page i got frontend and backend too – darkattack Sep 16 '18 at 17:05
  • @darkattack if this worked can you accept the answer? Also if you're having a whitescreen - try running php bin/magento deploy:mode:set developer to get better error reporting on the frontend. – ol'bob dole Sep 17 '18 at 16:10

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.