Fix permission denied handling for clients