You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
List the contents of a directory by using the `az storage blob directory list` command.
177
+
List the contents of a directory by using the `az storage fs file list` command.
160
178
161
179
This example lists the contents of a directory named `my-directory` that is located in the `my-file-system` file system of a storage account named `mystorageaccount`.
162
180
163
181
```azurecli
164
-
az storage blob directory list -c my-file-system -d my-directory --account-name mystorageaccount
182
+
az storage fs file list -f my-file-system --path my-directory --account-name mystorageaccount
165
183
```
166
184
167
185
## Upload a file to a directory
168
186
169
-
Upload a file to a directory by using the `az storage blob directory upload` command.
187
+
Upload a file to a directory by using the `az storage fs directory upload` command.
170
188
171
189
This example uploads a file named `upload.txt` to a directory named `my-directory`.
Delete a file by using the `az storage blob delete` command.
216
+
Delete a file by using the `az storage fs file delete` command.
204
217
205
218
This example deletes a file named `my-file.txt`
206
219
207
220
```azurecli
208
-
az storage blob delete -c my-file-system -b my-file.txt --account-name mystorageaccount
221
+
az storage fs file delete -p my-directory/my-file.txt-f my-file-system --account-name mystorageaccount
209
222
```
210
223
211
224
## Manage permissions
@@ -215,22 +228,22 @@ You can get, set, and update access permissions of directories and files.
215
228
> [!NOTE]
216
229
> If you're using Azure Active Directory (Azure AD) to authorize commands, then make sure that your security principal has been assigned the [Storage Blob Data Owner role](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-owner). To learn more about how ACL permissions are applied and the effects of changing them, see [Access control in Azure Data Lake Storage Gen2](https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-access-control).
217
230
218
-
### Get directory and file permissions
231
+
### Get an ACL
219
232
220
-
Get the ACL of a **directory** by using the `az storage blob directory access show` command.
233
+
Get the ACL of a **directory** by using the `az storage fs access show` command.
221
234
222
235
This example gets the ACL of a directory, and then prints the ACL to the console.
223
236
224
237
```azurecli
225
-
az storage blob directory access show -d my-directory -c my-file-system --account-name mystorageaccount
238
+
az storage fs access show -p my-directory -f my-file-system --account-name mystorageaccount
226
239
```
227
240
228
-
Get the access permissions of a **file** by using the `az storage blob access show` command.
241
+
Get the access permissions of a **file** by using the `az storage fs access show` command.
229
242
230
243
This example gets the ACL of a file and then prints the ACL to the console.
231
244
232
245
```azurecli
233
-
az storage blob access show -b my-directory/upload.txt -c my-file-system --account-name mystorageaccount
246
+
az storage fs access show -p my-directory/upload.txt -f my-file-system --account-name mystorageaccount
234
247
```
235
248
236
249
The following image shows the output after getting the ACL of a directory.
@@ -239,29 +252,30 @@ The following image shows the output after getting the ACL of a directory.
239
252
240
253
In this example, the owning user has read, write, and execute permissions. The owning group has only read and execute permissions. For more information about access control lists, see [Access control in Azure Data Lake Storage Gen2](data-lake-storage-access-control.md).
241
254
242
-
### Set directory and file permissions
255
+
### Set an ACL
243
256
244
-
Use the `az storage blob directory access set` command to set the ACL of a **directory**.
257
+
Use the `az storage fs access set` command to set the ACL of a **directory**.
245
258
246
259
This example sets the ACL on a directory for the owning user, owning group, or other users, and then prints the ACL to the console.
247
260
248
261
```azurecli
249
-
az storage blob directory access set -a "user::rw-,group::rw-,other::-wx" -d my-directory -c my-file-system --account-name mystorageaccount
262
+
az storage fs access set -a "user::rw-,group::rw-,other::-wx" -p my-directory -f my-file-system --account-name mystorageaccount
250
263
```
251
264
252
265
This example sets the *default* ACL on a directory for the owning user, owning group, or other users, and then prints the ACL to the console.
253
266
254
267
```azurecli
255
-
az storage blob directory access set -a "default:user::rw-,group::rw-,other::-wx" -d my-directory -c my-file-system --account-name mystorageaccount
268
+
az storage fs access set -a "default:user::rw-,group::rw-,other::-wx" -p my-directory -f my-file-system --account-name mystorageaccount
256
269
```
257
270
258
-
Use the `az storage blob access set` command to set the acl of a **file**.
271
+
Use the `az storage fs access set` command to set the acl of a **file**.
259
272
260
273
This example sets the ACL on a file for the owning user, owning group, or other users, and then prints the ACL to the console.
261
274
262
275
```azurecli
263
-
az storage blob access set -a "user::rw-,group::rw-,other::-wx" -b my-directory/upload.txt -c my-file-system --account-name mystorageaccount
276
+
az storage fs access set -a "user::rw-,group::rw-,other::-wx" -p my-directory/upload.txt -f my-file-system --account-name mystorageaccount
264
277
```
278
+
265
279
The following image shows the output after setting the ACL of a file.
az storage fs access set --permissions rwxrwxrwx -p my-directory/upload.txt -f my-file-system --account-name mystorageaccount
287
301
```
288
302
289
303
You can also update the owning user and group of a directory or file by setting the `--owner` or `group` parameters to the entity ID or User Principal Name (UPN) of a user.
You can add user-defined metadata to a file or directory by using the `az storage blob directory metadata update` command with one or more name-value pairs.
305
-
306
-
This example adds user-defined metadata for a directory named `my-directory` directory.
0 commit comments