Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Folder Permissions NOT REMOVED with Folder SyncFolder Permissions NOT REMOVED with Folder Sync
Previous
 
Next
New Post
2/22/2015 1:22 AM
 

I was under a spam attack with over 100K fake users, had to disable registration, in the process of deleting all users as per  blog article:

http://www.dnnsoftware.com/community-blog/cid/155027/quick-tip-getting-rid-of-spam-users

Deleted all users folders manually, from the server via remote desktop access.

I then went to the File Manager/Admin  to  perform a sync to get rid of all folder entries and folder permissions in the database.

With over 100K user folders, it is taking sometime, with 12 hours now and I am half way thought, while with little impact on site performance

Have noticed the folders reference is being removed without an issue (table: "folders") but the corresponding folder permissions (in table: folderpermisssions) are NOT REMOVED!

With an average of 5 rows in the permissions table per folder, I'm having over 500,000 Orphan rows in the folderpemissions table .

I am using DNN 7.3.4, SQL 2012 web edition on a Win 2102 standard edition.

 

 

 
New Post
2/22/2015 4:07 AM
 
Salem,
once you finished deleting the Folder, you may run
DELETE FROM {databaseOwner}[{objectQualifier}FolderPermission]
WHERE FolderID NOT IN (SELECT FolderID FROM {databaseOwner}[{objectQualifier}Folders]
You should also add a foreign key reference on FolderID, I am currently finishing next Version of TurboDNN script, which will ensure all foreign keys to be in place.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
2/22/2015 4:45 AM
 

Thanks alot, Sebastian!

I was about to post an identical workaround (see below script). As for the foreign key insertion, I rather wait for your script, than me messing around with the folders and folderpermission tables  :)

I run the below script on a development portal with a clone copy of the database via the SQL/Host and SQL Management Studio, both worked seamlessly.

BTW, I also tested the delete folder function in the File Management/ADMIN, and still the issue of not removing the folder permissions are there, it seems a bug in the Folder Sync function of DNN. 

FYI: successfully executing the script took max 10 mins while the folder sync a whole day !

use [NAMEOFYOURDATABASE]
DELETE FROM FolderPermission 
WHERE FolderID NOT IN (SELECT FolderID FROM Folders)

 
New Post
2/24/2015 3:45 AM
 
I am glad I was able to help.
The misssing key constraint might be a cause of TurboDNN, this will be fixed in next Version, which also includes autofix for all other core FK constraints.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Folder Permissions NOT REMOVED with Folder SyncFolder Permissions NOT REMOVED with Folder Sync


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out