fixed permission script