Now returns permission error when necessary.