rules_version = '2'; service firebase.storage { match /b/{bucket}/o { match /{allPaths=**} { allow read, write: if false; } match /users/{userId}/{allPaths=**} { allow read: if true; allow write: if request.auth.uid == userId; } } }