https://discord.umbraco.com logo
#help-with-umbraco
Why is Umbraco 10 trying to create a /wwwroot/html directory?
# help-with-umbraco
m

MattInsp

02/12/2024, 12:07 PM
Does anyone know why Umbraco 10 is trying to create a
/wwwroot/html
directory? This is not listed as a directory that requires create permissions in the docs (https://docs.umbraco.com/umbraco-cms/v/10.latest-lts/fundamentals/setup/server-setup/permissions).
j

Jason

02/12/2024, 1:36 PM
When is this happening? Can you share an error message?
m

MattInsp

02/13/2024, 7:29 AM
Unhandled exception in AppDomain (terminating). System.UnauthorizedAccessException: Access to the path '/wwwroot/html' is denied. ---> System.IO.IOException: Permission denied --- End of inner exception stack trace --- at System.IO.FileSystem.CreateDirectory(String fullPath) at System.IO.Directory.CreateDirectory(String path) at Umbraco.Cms.Core.IO.IOHelper.EnsurePathExists(String path) at Umbraco.Cms.Core.Runtime.EssentialDirectoryCreator.Handle(UmbracoApplicationStartingNotification notification) at Umbraco.Cms.Core.Events.EventAggregator.PublishCore(IEnumerable`1 all Handlers, INotification notification) at Umbraco.Cms.Core.Events.NotificationHandlerWrapperImpl`1.Handle(INotification notification, ServiceFactory serviceFactory, Action`2 publish) at Umbraco.Cms.Core.Events.EventAggregator.PublishAsync[TNotification](TNotification notification, CancellationToken cancellationToken) at Umbraco.Cms.Infrastructure.Runtime.CoreRuntime.StartAsync(CancellationToken cancellationToken, Boolean isRestarting) at Umbraco.Cms.Infrastructure.Runtime.CoreRuntime.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) at **.Program.Main(String[] args) in /**/Program.cs:line 6
k

kdxperbol

02/13/2024, 7:47 AM
Only running one 10 but don't have that directory. Any plugins?
m

MattInsp

02/13/2024, 8:21 AM
Only uSync and Umbraco Forms. I also don't have this directory on any of the other environments running this exact application. The issue came up because we're strict with permissions and Umbraco stopped working when it tried to create this directory.
s

Sebastiaan

02/13/2024, 9:59 AM
There's no code in Umbraco that tries to create an
html
directory, nor does Forms and I can't imagine uSync would either. Very weird.
j

Jason

02/13/2024, 11:44 AM
Well, looking at the code, https://github.com/umbraco/Umbraco-CMS/blob/v10/dev/src/Umbraco.Core/Runtime/EssentialDirectoryCreator.cs The only thing that's not a known const (none of which include
html
) is
_globalSettings.UmbracoMediaPhysicalRootPath
Do you have anything set in your appsettings for
"UmbracoMediaPhysicalRootPath"
that would cause Umbraco to try and ensure a
html
directory in there?
m

MattInsp

02/14/2024, 10:01 AM
yeah it's odd. It just started happening on one of our environments that had not been changed. We noticed because we're strict with the permissions. The error killed the app from starting though which was not ideal.
This could actually be it. I believe it's a permissions issue where we're writing to a directory elsewhere on the server. Potentially server config for directory permissions changed and resulted in this error when the app restarted. Thanks
k

kdxperbol

02/15/2024, 9:44 AM
For posterity, was the problem a custom
UmbracoMediaPhysicalRootPath
?
2 Views