> For the complete documentation index, see [llms.txt](https://bohans.gitbook.io/devops/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bohans.gitbook.io/devops/ngnix/ji-chu-zhi-shi/4.-nginx-fu-wu-qi-de-dai-li-fu-wu/4.3-nginx-fu-wu-qi-de-fan-xiang-dai-li-fu-wu/proxy-cache-de-pei-zhi-de-12-ge-zhi-ling/proxy_store_access.md).

# proxy\_store\_access

<mark style="color:blue;">**proxy\_store\_access**</mark>指令用于<mark style="color:blue;">**设置用户或用户组对Proxy Store缓存的数据的访问权限**</mark>，其语法结构为：

```nginx
proxy_store_access users:permissions ...;
```

* <mark style="color:blue;">**users**</mark>，可以设置为**user**、**group**或者**all**。
* <mark style="color:blue;">**permissions**</mark>，设置**权限**。

```nginx
location /images/
{
  root  /data/www;
  error_page  404 = /fetch$uri;                           #定义了404错误的请求页面
}
location  /fetch/                                        #匹配404错误时的请求
{
  proxy_pass  http://backend;
  proxy_store  on;                                        #开启Proxy Store方法
  proxy_store_access  user:rw  group:rw  all:r;
  root  /data/www;                                        #缓存数据的路径
}
```
