Use fperms instead of chmod