Skip to main content
Inspiring
April 21, 2014
Answered

Access denied on a datasource

  • April 21, 2014
  • 1 reply
  • 2937 views

A big problem, I cannot anymore use my new CF datasource.

I use to declare CF datasource on a C F9 64bits , Windows serveur 2008 64bits environment.

I have around 80 datasources declared (Access mdb files).

I use the same procedure to create my datasource.

create the ODBC32 datasource.

Then create the CF datasource linked to the created ODBC datasource.

As I always do.

When I verify the datasource in the CF admin, it says OK. all seems good

And when I do a query to that datasource,

I have this message :

Security: The requested template has been denied access to allergan_prof_sante.

The following is the internal exception message: access denied (coldfusion.sql.DataSourcePermission allergan_prof_sante)

I tried to create an other datasource.

Same behaviour. OK in the CF admin.

And "access denied" when doing a query.

So now, any datasource created cannot be accessed.

I did not change anything on the Windows server

The only change, is my client PC which ftp the mdb file.

It was Vista, and is now windows 7.

Any urgent help is welcome. I cannot anymore use new datasource.

All old datasource are working correctly.

I looked at the mdb files properties, old and new , they have the same.

Thanks for help.

    This topic has been closed for replies.
    Correct answer plarts

    Long shot: check the case of the DSN. Is it the same case in the CF Admin and in the code? I've had that issue before with Access DSNs, even on Windows (which should not be case sensitive.) Do you also have sandbox security enabled? If so, check the options in the CF Admin to make sure the DSN is not being blocked.


    Thanks all,

    I checked DSN name in odbc32, CFadmin, code, I put the same every where.

    Same behaviour. (and always successfull in CFadmin)

    BUT GREAT : sandbox security problem , really great , full of thanks ...

    So now, when creating a new datasource, it is put automatically is "disabled" datasource.

    I just have to reenable them.

    Why this have changed ??? only god knows ?

    Or may be "sandbox security was not checked some time ago, and I did it,

    not thinking that new datasource will be disabled.

    Many thanks again, I was so lost and down.

    Pierre.

    1 reply

    Carl Von Stetten
    Legend
    April 21, 2014

    plarts,

    Have you checked that the user account ColdFusion is running under actually has permissions to read/write the .mdb files in question?

    -Carl V.

    plartsAuthor
    Inspiring
    April 21, 2014

    What is surprising, is that the mdb file (or any new mdb files I put) is in a

    directory I use for other datasources already declared. (declared before).

    Why now, CF would not access the new files, and is accessing the old files.

    In the windows services , CF 9 applications erver, in properties,

    I have the CF user account as : local system account

    It has never been changed.

    How can I check the read/write permission of this user (which is admin, I suppose)

    This is on production server,

    Could a reboot help ?

    thanks for help.

    Carl Von Stetten
    Legend
    April 21, 2014

    plarts,

    I wasn't saying that was definitely the problem.  The issue with permissions is one of the most common reasons an Access database connection fails.  I just wanted to rule it out.  I would still compare the file-level permissions on one of the working databases with one that doesn't work to see if there is anything different.

    Another thing to check: If you open the ODBC Data Sources applet (the one for the 32-bit subsystem - I think you have to manually navigate to it at \Windows\SysWOW64\odbcad32.exe), check if you can successfully test the datasource for one of the databases not currently working.  This will rule out an ODBC configuration problem.

    -Carl V.