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?
1 Answer
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 Commented Sep 16, 2018 at 13:04
-
well my php in cli set 7.2 in setting i have 7.0 prntscr.com/kv0aw5 prntscr.com/kv0b5c Commented Sep 16, 2018 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 Commented Sep 16, 2018 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. Commented Sep 17, 2018 at 16:10
sudo chmod -R 0777 bin