diff --git a/main/manager.c b/main/manager.c
index 7e637ff4e6d0e1e8379be08ee826b5b139d222f2..d146196452f36d6f1682a1c6ce426390fcce9818 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -1049,6 +1049,10 @@ static int authenticate(struct mansession *s, const struct message *m)
 			ast_log(LOG_NOTICE, "%s tried to authenticate with nonexistent user '%s'\n", ast_inet_ntoa(s->sin.sin_addr), user);
 			return -1;
 		}
+		if (!readperm)
+			readperm = -1;
+		if (!writeperm)
+			writeperm = -1;
 	}
 
 	}