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
Copy file name to clipboardExpand all lines: articles/azure-netapp-files/manage-file-access-logs.md
+66-12Lines changed: 66 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,9 @@ ms.workload: storage
13
13
ms.tgt_pltfrm: na
14
14
ms.devlang: na
15
15
ms.topic: how-to
16
-
ms.date: 04/24/2023
16
+
ms.date: 05/09/2023
17
17
ms.author: anfdocs
18
+
ms.custom: references_regions
18
19
---
19
20
# Manage file access logs in Azure NetApp Files
20
21
@@ -24,17 +25,17 @@ File access logs provide file access logging for individual volumes, capturing f
24
25
25
26
## Considerations
26
27
27
-
* Once file access logs are enabled on a volume, they can take a maximum of five minutes to become visible.
28
+
* Once file access logs are enabled on a volume, they can take up to five minutes to become visible.
28
29
* File access logs occasionally create duplicate logs that must be manually filtered.
29
-
*Deleting any diagnostic settings configured for `ANFFileAccess` causes any file access logs for any volumes with that setting to be disabled.
30
+
*If you delete any diagnostic settings configured for `ANFFileAccess`, it will cause file access logs for any volumes with that setting to be disabled.
30
31
* Before enabling file access logs on a volume, either [ACLs](configure-access-control-lists.md) or Audit ACEs need to be set on a file or directory. ACLs or Audit ACEs must be set after mounting a volume.
31
32
* File access logs provide no explicit or implicit expectations or guarantees around logging for auditing and compliance purposes.
32
33
33
34
## Recognized events
34
35
35
-
File access logs captures different file and directory events depending on the protocol used.
36
+
The events capture in file access logs depend on the protocol your volume uses.
36
37
37
-
### NFS events
38
+
### Logged NFS events
38
39
* Close
39
40
* Create
40
41
* Get attributes
@@ -49,7 +50,7 @@ File access logs captures different file and directory events depending on the p
49
50
* Verify
50
51
* Write
51
52
52
-
### SMB events
53
+
### Logged SMB events
53
54
* Create
54
55
* Delete
55
56
* Get attributes
@@ -73,23 +74,76 @@ The file access logs feature is currently in preview. If you're using this featu
73
74
74
75
You can also use [Azure CLI commands](/cli/azure/feature)`az feature register` and `az feature show` to register the feature and display the registration status.
75
76
77
+
## Supported regions
78
+
79
+
While in preview, file access logs is supported in:
80
+
81
+
* East US 2
82
+
* Japan East
83
+
84
+
<!-- 9 may 2023 -->
85
+
86
+
87
+
## Set SACLs or Audit ACEs on files and directories
88
+
89
+
You must set system access control lists (SACLs) for SMB shares or Audit ACEs (for NFSv4.1 shares) for auditing.
90
+
91
+
After mounting the volume, SACLs (in case of an SMB/CIFS share) or Audit ACEs (in case of an NFSv4 mount) needs to be set on files/directories for auditing of file operations to happen on the volume.
92
+
93
+
### [Set SACLs for SMB shares](#tab/sacls-smb)
94
+
95
+
There are three ways to set SACLs for access logs.
96
+
97
+
If you are logging access events on all files and directories within a volume or qtree, set SACLs by applying Storage-Level Access Guard security.
98
+
99
+
If you are logging access events on individual files and directories, setting of SACLs with:
100
+
* The Windows Explorer GUI
101
+
* The `fsecurity` command
102
+
103
+
>[!NOTE]
104
+
> Select only the events you need to log. Selecting too many log options may impact system performance.
105
+
106
+
To enable logging access on individual files and directories, complete the following steps on the Windows administration host.
107
+
108
+
#### Steps
109
+
110
+
To enable logging access on individual files and directories, complete the following steps on the Windows administration host.
111
+
112
+
1. Select the file or directory for which to enable logging access.
113
+
1. Right-click the file or directory, then select **Properties**.
114
+
1. Select the **Security** tab then **Advanced**.
115
+
1. Select the **Auditing** tab. Add, edit, or remove the auditing options you want.
116
+
117
+
### [Set Audit ACEs for NFSv4.1 shares](#tab/sacls-smb)
118
+
119
+
Configure logging for UNIX security style files and directories by adding audit ACEs to NFSv4.1 ACLs to monitoring of certain NFS file and directory access events for security purposes.
120
+
121
+
For NFSv4.1, both discretionary and system ACEs are stored in the same ACL. They are not stored in separate DACLs and SACLs. Exercise caution when adding audit ACEs to an existing ACL to avoid overwriting and losing an existing ACL. The order in which you add audit ACEs to an existing ACL doesn't matter.
122
+
123
+
For steps, see [Configure access control lists on NFSv4.1 volumes](configure-access-control-lists.md).
124
+
125
+
<!-- end -->
126
+
---
127
+
76
128
## Enable file access logs
77
129
78
-
1. Select the volume you want to enable file access logs for.
79
-
2. Select **Diagnostic settings** from the left-hand pane.
130
+
1. In the **Volumes** menu, select the volume you want to enable file access logs for.
131
+
1. Select **Diagnostic settings** from the left-hand pane.
132
+
1. Select **+ Add diagnostic setting**.
80
133
:::image type="content" source="../media/azure-netapp-files/logs-diagnostic-settings-add.png" alt-text="Screenshot of Azure Diagnostic settings menu.":::
81
-
3. In the **Diagnostic settings** page, provide a diagnostic setting name, select **ANFFileAccess** and then set the retention period of the logs.
134
+
1. In the **Diagnostic setting** page, provide a diagnostic setting name.
135
+
Under **Logs > Categories**, select **ANFFileAccess** and then set the retention period of the logs.
82
136
:::image type="content" source="../media/azure-netapp-files/logs-diagnostic-settings-enable.png" alt-text="Screenshot of Azure Diagnostic settings menu with file access diagnostic setting.":::
83
-
4. Select one of the destination options for the logs:
137
+
1. Select one of the destination options for the logs:
84
138
* Archive to a storage account
85
139
* Stream to an event hub
86
140
> [!IMPORTANT]
87
141
> Two additional options are presented in the UI: **Send to Log Analytics workspace** and **Send to a partner solution**. These options are not supported. No error message will display if you select these destination options, and you will not be able to access your logs.
88
-
5. Save the settings
142
+
1. Save the settings
89
143
90
144
## Disable file access logs
91
145
92
-
1.Select the volume on which you want to disable file access logs.
146
+
1.In the **Volumes** menu, select the volume on which you want to disable file access logs.
93
147
2. Select the **Diagnostic setting** menu from the left-hand pane.
94
148
3. In the **Diagnostic settings** page, deselect **ANFFileAccess**.
0 commit comments