Use [`mc admin policies`](https://docs.minio.io/docs/minio-admin-complete-guide.html#policies) to create canned policies. Server provides a default set of canned policies namely `writeonly`, `readonly` and `readwrite`*(these policies apply to all resources on the server)*. These can be overridden by custom policies using `mc admin policies` command.
Use [`mc admin policy`](https://docs.minio.io/docs/minio-admin-complete-guide.html#policies) to create canned policies. Server provides a default set of canned policies namely `writeonly`, `readonly` and `readwrite`*(these policies apply to all resources on the server)*. These can be overridden by custom policies using `mc admin policy` command.
Create new canned policy file `getonly.json`. This policy enables users to download all objects under `my-bucketname`.
```json
@ -35,36 +35,36 @@ EOF
Create new canned policy by name `getonly` using `getonly.json` policy file.
```
mc admin policies add myminio getonly getonly.json
mc admin policy add myminio getonly getonly.json
```
Create a new user `newuser` on Minio use `mc admin users`, specify `getonly` canned policy for this `newuser`.
Create a new user `newuser` on Minio use `mc admin user`, specify `getonly` canned policy for this `newuser`.
```
mc admin users add myminio newuser newuser123 getonly
mc admin user add myminio newuser newuser123 getonly
```
### 3. Disable user
Disable user `newuser`.
```
mc admin users disable myminio newuser
mc admin user disable myminio newuser
```
### 4. Remove user
Remove the user `newuser`.
```
mc admin users remove myminio newuser
mc admin user remove myminio newuser
```
### 5. Change user policy
Change the policy for user `newuser` to `putonly` canned policy.