> For the complete documentation index, see [llms.txt](https://liujinye.gitbook.io/openshift-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://liujinye.gitbook.io/openshift-docs/rbac/openshift-gei-mei-neng-da-kai-web-terminal-zhong-duan-de-yong-hu-tian-jia-quan-xian.md).

# openshift给没能打开web terminal终端的用户添加权限

创建 `role-pods-exec.yaml` 内容如下：

```
apiVersion: authorization.openshift.io/v1
kind: ClusterRole
metadata:
  name: pods-exec
rules:
- apiGroups:
  - ""
  attributeRestrictions: null
  resources:
  - pods/exec
  verbs:
  - get
```

创建cluster role pods-exec

```
oc cretete -f role-exec.yaml
```

添加cluster role role-exec 权限 到 testexec 用户

```
oc adm policy add-cluster-role-to-user pods-exec testexec
```
