Added a hook to change folder and file permissions