fix file permissions; allow specification of owner and group