fixed permissions problem when copying non-root files