0

enter image description here

When I try to set permissions to folder and files using command like

find . -type f -exec chmod 644 {} \;                    // 644 permission for files
find . -type d -exec chmod 755 {} \;                    // 755 permission for directory 
find ./var -type d -exec chmod 777 {} \;                // 777 permission for var folder
find ./pub/media -type d -exec chmod 777 {} \;
find ./pub/static -type d -exec chmod 777 {} \;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml

after using this command my site not working properly and permission denied error when try any command

  • 1
    You need to run the above commands with sudo permission ... e.g) sudo chmod 777 ./app/etc – Bilal Usean Jul 7 '17 at 17:40
  • sudo chmod -R 777 app/etc/ – Abhishek Panchal Jul 7 '17 at 19:32
  • I try this command it shows "sudo: effective uid is not 0, is sudo installed setuid root?" – Velu Jul 8 '17 at 7:56
0

You need to have root privileges in order to give permission, If you are using amazon ec2 try:- sudo su - to switch to root and then try to give permission

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.