Skip to main content
Participant
April 15, 2021
Answered

Random File Permission Errors

  • April 15, 2021
  • 3 replies
  • 414 views

Just recently, I am getting the following error on a CFDUMP command.  I have a routine that runs every hour and 95% of the time, it works perfectly fine.  Every once in a while I'll get this error.  Would love to hear any thoughts as to how to possibly tackle this mysterious error!

 

COLUMN

0

LINE

-1

RAW_TRACE

java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\ColdFusion11\cfusion\wwwroot\CFIDE" "read")

TEMPLATE

"java.io.FilePermission" "C

TYPE

CFML

    This topic has been closed for replies.
    Correct answer Dave Watts

    Do you have sandboxes enabled? Those will cause this kind of error, although they usually cause it to happen all the time. But if you disable sandboxes, you shouldn't get any permissions issues when executing CF's own code.

     

    Dave Watts, Eidolon LLC

    3 replies

    Participant
    April 24, 2021

    Thanks for the replies.  It turns out a change my host made did the trick.  They added an explicit sandbox READ permission on C:\ColdFusion11\cfusion\wwwroot\CFIDE and C:\ColdFusion11\cfusion\wwwroot\CFIDE\

     

    Since that change, I haven't seen the error appear.

    Community Expert
    April 25, 2021

    I'm glad that helped! Sandboxes are a bit too complicated for me, so I try to avoid them. I owe this specific bit of knowledge to a guy named Russ Michaels.

     

    Dave Watts, Eidolon LLC

    Dave Watts, Eidolon LLC
    Dave WattsCommunity ExpertCorrect answer
    Community Expert
    April 16, 2021

    Do you have sandboxes enabled? Those will cause this kind of error, although they usually cause it to happen all the time. But if you disable sandboxes, you shouldn't get any permissions issues when executing CF's own code.

     

    Dave Watts, Eidolon LLC

    Dave Watts, Eidolon LLC
    BKBK
    Community Expert
    Community Expert
    April 16, 2021

    Mysterious, indeed. It appears that, once in a while, cfdump is denied read-access to a file. A potential cause is that, at the time, some other process was busy with the file.

     

    If so, then a named lock around the cfdump will solve the problem. Something like:

     

    <cflock name="lockToPreventRaceConditions" timeout="10">
        <cfdump var="xxx">
    </cflock>