Azure / Azure/azure-cli

ADLS Gen2 ACL set recursive

Open
#16,792 11 comments 2 reactions 1 assignee Claimed by @evelyn-ys View on GitHub
act-codegen-extensibility-squad feature-request Service Attention Storage
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

## Describe the bug

I am trying to give acl permission at root level directory and all child members by following [this](https://docs.microsoft.com/en-us/azure/storage/blobs/recursive-access-control-lists?tabs=azure-cli) doc.

**Command Name**

`az storage fs access set-recursive`

**Errors:**
```
CLIInternalError: The command failed with an unexpected error. Here is the traceback:
(StorageErrorException('(SetAclMissingAces) Invalid ACL: the user, group and other entries are required.\nRequestId:4aabfb54-201f-0013-5ca3-fa8fe0000000\nTime:2021-02-04T03:11:32.7925451Z'), '(SetAclMissingAces) Invalid ACL: the user, group and other entries are required.\nRequestId:4aabfb54-201f-0013-5ca3-fa8fe0000000\nTime:2021-02-04T03:11:32.7925451Z', None)
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.18.0/libexec/lib/python3.8/site-packages/azure/multiapi/storagev2/filedatalake/v2020_02_10/_path_client.py", line 572, in _set_access_control_internal
headers, resp = self._client.path.set_access_control_recursive(**options)
File "/usr/local/Cellar/azure-cli/2.18.0/libexec/lib/python3.8/site-packages/azure/multiapi/storagev2/filedatalake/v2020_02_10/_generated/operations/_path_operations.py", line 1321, in set_access_control_recursive
raise models.StorageErrorException(response, self._deserialize)
azure.multiapi.storagev2.filedatalake.v2020_02_10._generated.models._models_py3.StorageErrorException: (SetAclMissingAces) Invalid ACL: the user, group and other entries are required.
RequestId:4aabfb54-201f-0013-5ca3-fa8fe0000000
Time:2021-02-04T03:11:32.7925451Z

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.18.0/libexec/lib/python3.8/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/Cellar/azure-cli/2.18.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 659, in execute
raise ex
File "/usr/local/Cellar/azure-cli/2.18.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 722, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/local/Cellar/azure-cli/2.18.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 714, in _run_job
return cmd_copy.exception_handler(ex)
File "/usr/local/Cellar/azure-cli/2.18.0/libexec/lib/python3.8/site-packages/azure/cli/command_modules/storage/__init__.py", line 338, in new_handler
raise ex
File "/usr/local/Cellar/azure-cli/2.18.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 693, in _run_job
result = cmd_copy(params)
File "/usr/local/Cellar/azure-cli/2.18.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 330, in __call__
return self.handler(*args, **kwargs)
File "/usr/local/Cellar/azure-cli/2.18.0/libexec/lib/python3.8/site-packages/azure/cli/core/__init__.py", line 786, in default_command_handler
return op(**command_args)
File "/usr/local/Cellar/azure-cli/2.18.0/libexec/lib/python3.8/site-packages/azure/cli/command_modules/storage/operations/fs_directory.py", line 63, in set_access_control_recursive
result = client.set_access_control_recursive(acl=acl, progress_hook=progress_callback, **kwargs)
File "/usr/local/Cellar/azure-cli/2.18.0/libexec/lib/python3.8/site-packages/azure/multiapi/storagev2/filedatalake/v2020_02_10/_path_client.py", line 461, in set_access_control_recursive
return self._set_access_control_internal(options=options, progress_hook=progress_hook,
File "/usr/local/Cellar/azure-cli/2.18.0/libexec/lib/python3.8/site-packages/azure/multiapi/storagev2/filedatalake/v2020_02_10/_path_client.py", line 617, in _set_access_control_internal
raise DataLakeAclChangeFailedError(error, error.message, last_continuation_token)
azure.multiapi.storagev2.filedatalake.v2020_02_10._models.DataLakeAclChangeFailedError: (StorageErrorException('(SetAclMissingAces) Invalid ACL: the user, group and other entries are required.\nRequestId:4aabfb54-201f-0013-5ca3-fa8fe0000000\nTime:2021-02-04T03:11:32.7925451Z'), '(SetAclMissingAces) Invalid ACL: the user, group and other entries are required.\nRequestId:4aabfb54-201f-0013-5ca3-fa8fe0000000\nTime:2021-02-04T03:11:32.7925451Z', None)
...
```

## To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

- `az storage fs access set-recursive --acl {} -p {} -f {} --account-name {} --account-key {}`

I am running the following command

`az storage fs access set-recursive --acl "group:xxxxxx:rwx,group:xxxxx:r-x" -p / -f test --account-name xxxxx --account-key xxxx`

## Expected Behavior

Command Should grant access to the given AD group to the directory and all child members.

## Environment Summary

```
macOS-10.15.7-x86_64-i386-64bit
Python 3.8.7
Installer: HOMEBREW

azure-cli 2.18.0

Extensions:
costmanagement 0.1.0
```
## Additional Context

NA

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.