Local file access doesn't allow access

On a fresh install of Lucee on Windows, when I set Security > Access > File access to “local” and run the following code at via the default IIS site, I get the error, “Access is prohibited by Security Manager”.

if (fileExists('C:\inetpub\wwwroot\test.txt')) {
	fileDelete('C:\inetpub\wwwroot\test.txt');
}
fileWrite('C:\inetpub\wwwroot\test.txt', 'Hello. #Now()#');
strFileContents = FileRead('C:\inetpub\wwwroot\test.txt');
dump(strFileContents);

expandPath(‘{web-root-directory}’) returns 'C:\inetpub\wwwroot', so it seems to know where it is. If I set file access to “all” or manually add the root to “Custom Directories”, it runs just fine. Is there something more I need to do to get local webroot file access to work?

Loader Version: 6.2.2.91
Servlet Container: Apache Tomcat/11.0.9
Java: 21.0.8 (Eclipse Adoptium) 64bit
Host Name: 127.0.0.1
OS: Windows 11 (10.0) 64bit
Mode: Single Mode

Thanks!

working on it

https://luceeserver.atlassian.net/browse/LDEV-5931

fixed in 6.2.4.14-SNAPSHOT

Fantastic! Thank you so much! I really appreciate it and all the work you do on Lucee!

1 Like