Skip to content

Commit aec3ae2

Browse files
Merge pull request #210421 from normesta/gen2
Fixing something
2 parents 602ab57 + b21c32d commit aec3ae2

File tree

1 file changed

+6
-24
lines changed

1 file changed

+6
-24
lines changed

articles/storage/blobs/data-lake-storage-access-control.md

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -238,36 +238,18 @@ When a new file or directory is created under an existing directory, the default
238238

239239
### umask
240240

241-
When creating a file or directory, umask is used to modify how the default ACLs are set on the child item. umask is a 9-bit value on parent directories that contains an RWX value for **owning user**, **owning group**, and **other**.
241+
When creating a default ACL, the umask is applied to the access ACL to determine the initial permissions of a default ACL. If a default ACL is defined on the parent directory, the umask is effectively ignored and the default ACL of the parent directory is used to define these initial values instead.
242+
243+
The umask is a 9-bit value on parent directories that contains an RWX value for **owning user**, **owning group**, and **other**.
242244

243245
The umask for Azure Data Lake Storage Gen2 a constant value that is set to 007. This value translates to:
244246

245247
| umask component | Numeric form | Short form | Meaning |
246248
|---------------------|--------------|------------|---------|
247-
| umask.owning_user | 0 | `---` | For owning user, copy the parent's default ACL to the child's access ACL |
248-
| umask.owning_group | 0 | `---` | For owning group, copy the parent's default ACL to the child's access ACL |
249+
| umask.owning_user | 0 | `---` | For owning user, copy the parent's access ACL to the child's default ACL |
250+
| umask.owning_group | 0 | `---` | For owning group, copy the parent's access ACL to the child's default ACL |
249251
| umask.other | 7 | `RWX` | For other, remove all permissions on the child's access ACL |
250252

251-
The umask value used by Azure Data Lake Storage Gen2 effectively means that the value for **other** is never transmitted by default on new children, unless a default ACL is defined on the parent directory. In that case, the umask is effectively ignored and the permissions defined by the default ACL are applied to the child item.
252-
253-
The following pseudocode shows how the umask is applied when creating the ACLs for a child item.
254-
255-
```console
256-
def set_default_acls_for_new_child(parent, child):
257-
child.acls = []
258-
for entry in parent.acls :
259-
new_entry = None
260-
if (entry.type == OWNING_USER) :
261-
new_entry = entry.clone(perms = entry.perms & (~umask.owning_user))
262-
elif (entry.type == OWNING_GROUP) :
263-
new_entry = entry.clone(perms = entry.perms & (~umask.owning_group))
264-
elif (entry.type == OTHER) :
265-
new_entry = entry.clone(perms = entry.perms & (~umask.other))
266-
else :
267-
new_entry = entry.clone(perms = entry.perms )
268-
child_acls.add( new_entry )
269-
```
270-
271253
## FAQ
272254

273255
### Do I have to enable support for ACLs?
@@ -329,7 +311,7 @@ A GUID is shown if the entry represents a user and that user doesn't exist in Az
329311
### How do I set ACLs correctly for a service principal?
330312

331313
When you define ACLs for service principals, it's important to use the Object ID (OID) of the *service principal* for the app registration that you created. It's important to note that registered apps have a separate service principal in the specific Azure AD tenant. Registered apps have an OID that's visible in the Azure portal, but the *service principal* has another (different) OID.
332-
314+
Article
333315
To get the OID for the service principal that corresponds to an app registration, you can use the `az ad sp show` command. Specify the Application ID as the parameter. Here's an example on obtaining the OID for the service principal that corresponds to an app registration with App ID = 18218b12-1895-43e9-ad80-6e8fc1ea88ce. Run the following command in the Azure CLI:
334316

335317
```azurecli

0 commit comments

Comments
 (0)