Skip to main content
Participant
Apr 15, 2021 11:48 PM UTC
Answered

Random File Permission Errors

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 is closed to new replies. Start a new post to keep the conversation going.
    Dave WattsCorrect answer
    Community Expert
    Apr 16, 2021 1:44 PM UTC

    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

    4 replies

    Participant
    Apr 24, 2021 12:04 AM UTC

    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.

    Translate
    Community Expert
    Apr 25, 2021 5:49 PM UTC

    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

    Translate
    Dave Watts, Eidolon LLC
    Dave WattsCommunity ExpertCorrect answer
    Community Expert
    Apr 16, 2021 1:44 PM UTC

    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

    Translate
    Dave Watts, Eidolon LLC
    BKBK
    Community Expert
    Community Expert
    Apr 16, 2021 8:31 AM UTC

    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>

     

     

    Translate