Docker install Permissions error

Hi everyone
(Yes I know you’re going to tell me to use commandbox @bdw429s :slight_smile: )

Anyway I am trying to replicate the production server instance via Docker.
I have created a new container from the CentOS(with SystemD) image.

I have installed NGINX,
I have installed TOMCAT (9.0.59)
I have installed Lucee JAR
I have configured the SHARED_Secret.

When I attempt to launch lucee admin (whether via curl IN the container) or on the host, via the browser, I get the following error, that I am hoping to get some help with, please.

Type Exception Report

Message Permission denied

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

javax.servlet.ServletException: Permission denied
	java.base/java.io.UnixFileSystem.createFileExclusively(Native Method)
	java.base/java.io.File.createNewFile(File.java:1035)
	lucee.commons.io.res.type.file.FileResource.getOutputStream(FileResource.java:261)
	lucee.commons.io.res.type.file.FileResource.getOutputStream(FileResource.java:254)
	lucee.commons.io.IOUtil.copy(IOUtil.java:171)
	lucee.runtime.config.XMLConfigFactory.createFileFromResource(XMLConfigFactory.java:291)
	lucee.runtime.config.XMLConfigFactory.createFileFromResource(XMLConfigFactory.java:302)
	lucee.runtime.config.XMLConfigFactory.createConfigFile(XMLConfigFactory.java:201)
	lucee.runtime.config.XMLConfigWebFactory.newInstance(XMLConfigWebFactory.java:266)
	lucee.runtime.engine.CFMLEngineImpl.loadJSPFactory(CFMLEngineImpl.java:927)
	lucee.runtime.engine.CFMLEngineImpl.addServletConfig(CFMLEngineImpl.java:796)
	lucee.loader.engine.CFMLEngineWrapper.addServletConfig(CFMLEngineWrapper.java:87)
	lucee.loader.engine.CFMLEngineFactory.getInstance(CFMLEngineFactory.java:211)
	lucee.loader.servlet.CFMLServlet.init(CFMLServlet.java:42)
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	mod_cfml.core.invoke(core.java:180)
	org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
	org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)
	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)
	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
	org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.base/java.lang.Thread.run(Thread.java:829)

Thanks
Gavin

Don’t forget to tell us about your stack!

OS: CentOS
Java Version: OpenJDK 11
Tomcat Version: 9.0.59
Lucee Version: 5.3.9.141

enter stage left, @Terry_Whitney telling you not to use Windows

2 Likes

Or just look at selinux

TRY this command

setenforce 0

Then restart httpd and lucee

Go ahead, run Windows 2022 Data Center Edition, IDC. If you want, I will hand you a link, take the reseller credits and split the proceeds between me, myself and I so I can buy a slightly new mac for a personal project, and donate the rest to the lucee foundation… :slight_smile:

1 Like

If you really need Docker, can’t you at least use CommandBox on it? Ortus has pre-built Docker images based on CommandBox that are certainly going to be more battle-tested than your custom install. They also come with all the creature comforts of CFConfig, DotENV baked in.

https://hub.docker.com/r/ortussolutions/commandbox/

1 Like

or the official Lucee docker images Docker Hub :slight_smile:

3 Likes