Skip to main content
WolfShade
Legend
September 21, 2012
Question

An issue with accessing files outside of web root

  • September 21, 2012
  • 2 replies
  • 7787 views

Basically, this is an extension of this thread.

I have added a mapping in CF Admin.

I have:

C:\ColdFusion9\xcfc

C:\ColdFusion9\wwwroot

In CF Admin, I have added a mapping: /xcfc points to C:\ColdFusion9\xcfc

I used the following code:

<cfinclude template="/xcfc/test.txt" />

I get an error message:

Security: the requested template has been denied access to C:\ColdFusion\xcfc\test.txt

(java.io.FilePermission C:\ColdFusion\xcfc\test.txt execute.)

I read, somewhere, about making sure the CF user has rights.  But in my Users CP (Win7), there is only Administrator, Guest, and myself.

???

^_^

    This topic has been closed for replies.

    2 replies

    Inspiring
    September 21, 2012

    You've probably got some sort of simplified user management mode on or something.  There will still be a local system account too.


    What a/c does the ColdFusion service run as?  It's that account that needs permissions.  That said, on a local install, the local system account usually has access to the whole file system.

    One thing I notice is this:

    I have:

    C:\ColdFusion9\xcfc

    But this:

    Security: the requested template has been denied access to C:\ColdFusion\xcfc\test.txt

    Those are not the same paths (note one is C:\ColdFusion9, the other is just C:\ColdFusion).

    Did you google the error message to seeif anyone else has had this?

    --

    Adam

    WolfShade
    WolfShadeAuthor
    Legend
    September 21, 2012

    Adam Cameron. wrote:

    Did you google the error message to seeif anyone else has had this?

    --

    Adam

    Yes, and I'm not finding anything, yet.

    ^_^

    Inspiring
    September 21, 2012

    Well check to see if the a/c CF is using can see the file first.  That might be all it is.

    --

    Adam

    Carl Von Stetten
    Legend
    September 21, 2012

    The directory structure you cited shows the path as C:\ColdFusion9\xcfc, but the error message indicates your mapping may actually be pointing at C:\ColdFusion\xcfc (it's missing the 9 at the end of ColdFusion).

    -Carl V.

    WolfShade
    WolfShadeAuthor
    Legend
    September 21, 2012

    Sorry.. I'm a walking zombie.. I'm an insomniac who has to wake up at 5am to get ready for work.  I can't copy/paste stuff, so I have to manually type error messages - the 9 is in the actual error message.

    ^_^