# ACL DRYRUN

> Check whether a user may run a command with given arguments, without running it.

URL: https://docs.hotkv.com/commands/acl-dryrun/

```
ACL DRYRUN username command [argument ...]
```

- Group: ACL
- Complexity: O(1)
- HotKV Cloud: all plans
- On-Premise: no license needed

`ACL DRYRUN` checks a user's rules against a command and its arguments,
including the keys and channels it would touch, and tells you whether the
user could run it. Nothing is executed. Use it to test new rules before you
hand out a password. The check uses the rules only, so a user that is off
can still be checked.

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| Allowed | Simple string `OK` | Simple string `OK` |
| Command not allowed | Bulk string `User <user> has no permissions to run the '<command>' command` | Bulk string |
| A key not allowed | Bulk string `User <user> has no permissions to access the '<key>' key` | Bulk string |
| A channel not allowed | Bulk string `User <user> has no permissions to access the '<channel>' channel` | Bulk string |
| Unknown user | Error `ERR User '<user>' not found` | Same error |
| Unknown command | Error `ERR Command '<command>' not found` | Same error |
| Wrong number of arguments for the command | Error `ERR wrong number of arguments for '<command>' command` | Same error |

A denial is a normal reply, not an error.

## Examples

```
127.0.0.1:6379> ACL SETUSER reports on >reports-password ~report:* -@all +@read
OK
127.0.0.1:6379> ACL DRYRUN reports GET report:2026
OK
127.0.0.1:6379> ACL DRYRUN reports GET user:1000
"User reports has no permissions to access the 'user:1000' key"
127.0.0.1:6379> ACL DRYRUN reports SET report:2026 x
"User reports has no permissions to run the 'set' command"
```

## Compatibility

Same arguments and replies as Redis 7 and Valkey 8, which also reply with a
bulk string for a denial.

## See also

[ACL SETUSER](https://docs.hotkv.com/commands/acl-setuser/index.md), [ACL GETUSER](https://docs.hotkv.com/commands/acl-getuser/index.md),
[ACL CAT](https://docs.hotkv.com/commands/acl-cat/index.md)