views:

1117

answers:

2

SETUP: SQL Server 2005 & DotNetNuke 05.01.02.

This started with me trying to install a DNN Module that had "select * from dbo.sysobjects" in it's SQL scripts. That failed with the following error:

The SELECT permission was denied on the object 'sysobjects', database 'mssqlsystemresource', schema 'sys'.

I logged into the database via SQL Server Management Studio as the DNN user account, and I get the same error when I try and perform a SELECT on the sysobjects view.

I tried to grant the DNN user account explicit SELECT permission to that view. When I check it by going to Security -> Users -> DNNUserLogin-> right-click -> Properties -> Securables and scroll down to find the sys.sysobjects view, it says this user account has explicit permissions for dbo: And the SELECT checkbox is checked. But I still cannot perform a select on the sysobjects view as that DNN user account.

What am I doing wrong? How can I make this work?

A: 

put the DNN user in the db_owner role

dudeman
This is like taking care of your gopher problem with dynamite. While this will resolve the error, it has a TON of side-effects, like removing any security restrictions on your application, essentially letting an attacker potentially exploit any bugs in DNN to do whatever they want with your data.
rwmnau
rwmnau - please tell us what we should do instead
dudeman
Grant only permissions that are really necessary. Like Chris did.
Arthur
+1  A: 

Solved. This was a problem with the user having deny privileges as well; in my haste to grant permissions I basically gave the user everything. And deny was killing it. So as soon as I removed those permissions it worked. Sorry everyone; false alarm! Dumb programmer at work!

Chris Holmes