U4-10249 - FolderAndFilePermissions HealthCheck causes the application to restart

Created by Jeavon Leopold 04 Aug 2017, 13:59:14 Updated by Shannon Deminick 01 Sep 2017, 06:08:35

Subtask of: UAASSCRUM-1073

When the FolderAndFilePermissionscheck is executed it triggers an application restart which isn't desirable especially for scheduled health checks.

Specially the app restart is triggered by the folder check on the "Bin" folder as it creates and deletes a file to test the permissions.

I have tested with commenting out only the ["Bin" folder|https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Web/HealthCheck/Checks/Permissions/FolderAndFilePermissionsCheck.cs#L67] check and the restart does not occur so I believe it is only this one that is an issue.

I think permissions can be checked by using Directory.GetAccessControl (https://msdn.microsoft.com/en-us/library/c1f66bc2(v=vs.110).aspx) https://stackoverflow.com/a/5394719 looks useful


Shannon Deminick 18 Aug 2017, 04:51:56

PR is here: https://github.com/umbraco/Umbraco-CMS/pull/2136

I've separated out any folder checks that will restart the web app if a file is written to them and for these checks we use the ACL APIs. We're sticking to the original code for the others because it is more reliable. The problem with the ACL Apis is that if the current user doesn't have access to read the ACLs then we cannot know if they have write access.

Sebastiaan Janssen 24 Aug 2017, 16:52:26

Works like a charm, cherry picked into 7.6 as well.

Priority: Major

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 7.7.0, 7.6.6

Due in version: 7.6.6

Sprint: Sprint 66

Story Points: 1