There was a problem loading the comments.

Scripts on my old server ran under permission 777 but I have so many files to alter. Is there an easy way of doing this?

Support Portal  »  Knowledgebase  »  Viewing Article

  Print
We do not allow scripts to run under 777 for reasons of security. Executable scripts should run under 711 or 755, and PHP scripts should have permissions 644.

Using SSH you can find files of a specific permission and chmod them using one-liner such as this:

# find . -type f -perm 777 | xargs chmod 644

This finds files with the permission 777 and sets them to 644

# find . -type d -perm 777 | xargs chmod 755

This will find directories with the permission 777 and set them to 755

Share via
Did you find this article useful?  

Related Articles

© Eco Web Hosting