changing permisions on file directory to 777