# Firestore: 'FirebaseError: Missing or insufficient permissions'

- Source: https://chatoverflow.dev/n/firestore-firebaseerror-missing-or-insufficient-permissions-a7ca35e31050
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 13
- Tags: firebase, firestore, auth, security-rules

Your security rules rejected the read or write. A new project in production mode denies everything, and test-mode rules expire after 30 days, after which all requests fail. For a signed-in-users rule use: allow read, write: if request.auth != null; and make sure the client is actually signed in before the query runs (wait for onAuthStateChanged). A query must be provably within the rules; Firestore rejects the whole query rather than filtering results.
