How do I solve "[allowedWritePaths] allowed list in the fileAccessControl configurat ..."?

I’m using WebMethods 10 on Windows 10. I’m trying to write to a file in my flow service (using pub.file.stringToFile. I have set the fileName service in parameter to “C:\testfiles\output1.txt” and even set the contents of my ./IntegrationServer/packages/WmPublic/config/fileAccessControl.cnf to the following

allowedWritePaths=C:/testfiles/*
allowedReadPaths=
allowedDeletePaths=

I have tried variations of the above, but even after restarting my server multiple times, I get this error upon running the service …

com.wm.app.b2b.server.ServiceException: [ISS.0086.9263] Specified path [C:\testfiles\output1.txt] is not on the [allowedWritePaths] allowed list in the fileAccessControl configuration file
at pub.file.checkPathValidity(file.java:170)
at pub.file.readerToFile(file.java:271)
at pub.file.stringToFile(file.java:971)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:411)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:745)
at wm.bci.internal.BciServiceInvokeNotifier.process(BciServiceInvokeNotifier.java:32)
at com.wm.ps.serviceMock.ServiceInterceptor.process(ServiceInterceptor.java:360)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:61)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:250)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:56)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:178)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:307)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:41)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:399)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:623)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:437)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:395)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:253)
at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:236)
at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:267)
at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:668)
at com.wm.lang.flow.FlowState.step(FlowState.java:534)
at com.wm.lang.flow.FlowState.invoke(FlowState.java:501)
at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:1150)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:745)
at wm.bci.internal.BciServiceInvokeNotifier.process(BciServiceInvokeNotifier.java:32)
at com.wm.ps.serviceMock.ServiceInterceptor.process(ServiceInterceptor.java:360)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:61)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:250)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:56)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:178)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:307)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:41)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:399)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:623)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:437)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:395)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:253)
at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:127)
at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:163)
at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:190)
at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:408)
at com.wm.util.pool.PooledThread.run(PooledThread.java:134)
at java.lang.Thread.run(Thread.java:748)

What else do I need to do to write to this file?

Hi,

please have a look at the IS Built-In-Services Reference guide for folder pub.file for further informations about configuring fileAccessControl.cnf.

Did you try “C:/testfiles” as entry to allow access to the files in testfiles directory?
Remember to reload the WmPublic package when making changes to fileAccessControl.cnf.

Regards,
Holger

I changed my path to what you suggested “C:/testfiles” and then shut down my IDE and restarted it and now a file is generated in that location. Before I had been restarted my server in the IDE but not actualy restarting the IDE (not quite sure how to reload a package as you suggested but I’ll look more into that).

Thanks!

Hi Tony,

reloading a package can be done via IS Admin UI under Packages -> Management, then click on the reload icon in the row for the package which requires a reload.

In Designer a package can be reloaded by right-clicking on the package and select "Reload Package" from the Context-Menu.

Please note that whenever a package is reloaded all other packages which have a dependency on this one are also reloaded.

Regards,
Holger