I was doing a magento patch via Terminal and ran the following commands whilst in / rather than /public_html

find . -type d -exec chmod 500 {} \;
find . -type f -exec chmod 400 {} \;
find var/ -type f -exec chmod 600 {} \;

Is there an easy fix for this, or have i messed up my server?

  • What OS you are using? – Sourav Jun 27 '17 at 19:55

I had some similar issue but not from root folder :s

If you use a RPM-based distro, this can be done using the rpm --setperms command. it would be painfully reverting one by one the packages, on Debian-like system apt-get --reinstall install is your friend.

I'm not shure it will work through all directory thought

| improve this answer | |

You've pretty well hosed your server. The quickest way to recover is going to be to reinstall your OS and restore your backups. You do have backups, right?

| improve this answer | |
  • Yes, I've got backups. Only a fool doesn't :) – Steve Price Jun 27 '17 at 19:41

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.