changed chmod to 777.