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

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

1 Answer 1

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 and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.