Changed the directory permissions to 777