// Redis error reference

NOPERM: The ACL user lacks permission

The connection authenticated as an ACL user whose rules do not cover this command, key pattern or channel, so Redis refuses it.

Error prefix
NOPERM
카테고리
Connection and auth
오류 메시지
NOPERM User default has no permissions to run the 'get' command

의미

Since Redis 6, permissions are per user in the ACL system. A connection can be fully authenticated and still be refused when the command is not in the user's command set, the key does not match the user's key patterns, or, for pub/sub, the channel is not allowed. A command refusal names the user and the command. A key refusal reads NOPERM No permissions to access a key on Redis 8.0 and names neither the user nor the key, so check ACL LOG for the user and key.

It is the least dramatic of the auth errors: the login works, the first refused command does not. It shows up after someone tightens a user to least privilege and misses a command, after key patterns were written for an old naming scheme, and when occasional jobs call commands outside the new set.

일반적인 원인

  • The user's command rules, such as +@read or +get, do not include the command the application calls.
  • The key does not match the user's ~pattern, so an otherwise permitted command is refused on that key.
  • The user was rotated to a narrower rule set and a batch job or admin tool still calls commands outside it.

Find the cause

ACL WHOAMI
# Which user this connection is
ACL GETUSER app
ACL LOG
# The most recent ACL rejections with the exact command and object; usually the fastest answer

해결 방법

  1. Inspect the user's effective permissions:

    ACL GETUSER app
    # flags, key patterns, channels, command rules
    ACL LIST
  2. Grant the missing command or category, scoped as narrowly as the app needs:

    ACL SETUSER app ~cache:* +get +set +del
  3. Verify as that user, not as admin, so the test matches what production does:

    AUTH app s3cret
    GET cache:user:1000

Other ways to handle it

Model roles with ACL categories (+@read, +@write, -@dangerous) instead of long per-command lists, so an upgrade that adds commands does not silently break the app. Keep one user per application and watch ACL LOG to catch what least privilege missed.

안전하게 재현하세요

redis-server --port 7305 --save '' &
redis-cli -p 7305 ACL SETUSER app on '>s3cret' '~cache:*' '+get'
redis-cli -p 7305 --user app --pass s3cret GET cache:x
# (nil) - allowed
redis-cli -p 7305 --user app --pass s3cret SET cache:x 1
# (error) NOPERM User app has no permissions to run the 'set' command

질문

The user has +@read, why is GET still refused?

Commands and key patterns are separate checks: both must match. A user with +@read whose patterns do not cover the key still gets NOPERM.

Where does Redis record these refusals?

ACL LOG keeps the recent security events. For a command refusal the object is the command name; for a key refusal it is the key. ACL LOG RESET clears the list.

관련 오류

More connection and auth errors

코드와 메시지 텍스트의 출처는 다음과 같습니다 Redis documentation and source code. 전체 목록은 Redis error list 또는 모든 데이터베이스 오류 검색.

// 오류는 줄이고, 수정은 빠르게

Work on Redis in SQLly

A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for Redis and the other databases you use.

이 페이지의 텍스트와 데이터: CC BY 4.0, 출처: SQLly (sqlly.app). 코드와 SQL 스니펫: MIT. 라이선스 세부 정보 인용된 오류 메시지 텍스트의 권리는 해당 데이터베이스 공급업체에 있습니다.