refactoring permisisons checks and setting required permission to 755
644 permissions?
permissions required, down to 755 from 777