• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Access denied on a datasource

Contributor ,
Apr 21, 2014 Apr 21, 2014

Copy link to clipboard

Copied

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.

Views

2.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Apr 22, 2014 Apr 22, 2014

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

...

Votes

Translate

Translate
Guide ,
Apr 21, 2014 Apr 21, 2014

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 21, 2014 Apr 21, 2014

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Apr 21, 2014 Apr 21, 2014

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 21, 2014 Apr 21, 2014

Copy link to clipboard

Copied

Thanks,

How to check the file-level permission of the old and new mdb files ?

I do not know how to check this.

Also, how to check the ODBC datasource ?

When ckecked under CFadmin, it does gives the OK. (CF datasource)

the one not cuurently working, which gives the access denied.

(For ODBC, yes, I run the  Windows\SysWOW64\odbcad32.exe)

An other interesting indication,

I used a old CF datasource, I just place a new mdb file and rename with the

declared name in the old datasource, and then it works.

Which means, I can use all existing datasource, with new mdb file in it.

Pierre.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Apr 21, 2014 Apr 21, 2014

Copy link to clipboard

Copied

For the first question, right click on the .mdb file in Explorer and select Properties.  Go to the Security tab and look at the permissions granted to SYSTEM and any other users.

For the second question, you need to run Windows\SysWOW64\odbcad32.exe.  Select the database connection in question and go through the configuration steps (probably without making changes).  On one of the screens it should have a button to test the connection.  Do that and see what happens.

-Carl V.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 21, 2014 Apr 21, 2014

Copy link to clipboard

Copied

I looked at mdb properties, permissions for system, thay have all,

and same grant than other (old) mdb files.

In the odbcad32.exe , there is no "test" button.

Only : select , create, repair, compact

And advanced, and options.

No test button in any.

What you think of in the previous reply :

An other interesting indication,

I used a old CF datasource, I just place a new mdb file and rename with the

declared name in the old datasource, and then it works.

Which means, I can use all existing datasource, with new mdb file in it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Apr 21, 2014 Apr 21, 2014

Copy link to clipboard

Copied

Oops, you are correct.  I confused the Access ODBC settings with the SQL Server ones (which allow you to test).  My only other thought is to use Access or Excel to connect to the ODBC datasource and see if it can read it.

Just so you know, many people have fought with getting 64-bit ColdFusion to talk to MS Access - and most give up because it is so painful.  There have been several posts on the Adobe forums in the past that you might look at for further ideas, but generally it is not recommended to do this.  You'd be better off using a 32-bit ColdFusion install if you must deal with Access databases.  However, I'll repeat my recommendation from a previous thread of yours - don't use Access at all in ColdFusion.

If you are trying to use ColdFusion simply as an automation tool for manipulating Access data, I would just look for ways to do those manipulations from within MS Access (either through a series of queries and macros, or if you really want to dig in, with the built-in VBA).

-Carl V.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 21, 2014 Apr 21, 2014

Copy link to clipboard

Copied

I really need to find a solution,

I have 64bits server then CF 64bits,

so I cannot get back to 32bits.

Or build a new machine, with all. (need to rebuy all).

Also, I have all my systems and webs set with mdb files.

Even for single user, I use CF, because is easier for me to develop under CF.

Any othe ridea, why suddenly, the new CF Datasource have "access denied" ?

(all previous working, in same directory).

Thanks for any help.

Pierre.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Apr 21, 2014 Apr 21, 2014

Copy link to clipboard

Copied

You can install and run 32-bit ColdFusion on a 64-bit Windows server, so don't worry about that.

The only other thing I can think of is that the databases might be password-protected or have additional user security added.  If you double-click on one of the problem MDB files in Explorer, does it open right up or does it prompt you for a login/password?  If it doesn't, do you have the credentials in the ColdFusion datasource set to use "Admin" for the username and a blank password?

If that isn't your problem, then I'm out of ideas at this point.

Good luck,

-Carl V.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 21, 2014 Apr 21, 2014

Copy link to clipboard

Copied

Well, no there is no password.

Then I need to understand what have changed.

This did work and does not work anymore,

could it be an automated Windows update ?

Is the number of declared datasource limited (I have 68 declared) ?

Pierre.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Apr 21, 2014 Apr 21, 2014

Copy link to clipboard

Copied

If the *exact* same databases worked previously, then something else must be at play here.  Could a Windows update have broken things?  It's possible, although if that were the case I'd expect all of the datasources to be broken.  I'm not aware of any limits to the number of datasources allowed in ColdFusion.

Just to be clear, have you tried to open the MDB files in question in the MS Access program?  Have you run "compact and repair" on them to see if there is some corruption in those particular files?

-Carl V.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 22, 2014 Apr 22, 2014

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 22, 2014 Apr 22, 2014

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 22, 2014 Apr 22, 2014

Copy link to clipboard

Copied

LATEST

Glad to have helped, the security in CF has been upgraded over time, hence the new defaults.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation