fixed permissions script