SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a document library with about 25,000 folders in it, each folder represents a task in our task system and is used as a document repository for those tasks.

Of the 25,000 tasks about 22,000 are in a closed state (completed, cancelled, etc...). Our goal is to make the folders for closed tasks read only and the remaining 3,000 ones not. We expect to write .NET code which will interact with the SharePoint API and/or workflows to accomplish this. Metadata exists on the folders which can be used to calculate whether or not the folder should be read only or not.

We already tried setting the default permissions for the document library to read only and then setting custom permissions for the remaining 3,000 items (through code) to open back up access... what a nightmare. we passed that 1,000 security scope limit and just about took out the whole farm...

share|improve this question
What about an "archive" process that moves them into a separate document library? Then, that doc lib could have the read only permissions. – Kit Menke Nov 13 '11 at 5:52
A 'read only' is a security aspect, You cannot do it without editing permissions.You can make the task easier by grouping the items\folders into two separate folders or document libraries. – Amit Kumawat Nov 13 '11 at 6:02
@Kit - We've considered the idea of putting the closed items into separate folders/separate document libraries. The problem is that there is a vendor provided interface which connects our task management system with SharePoint and it expects all the folders to be in the root of a single document library. Because of this people would no longer be able to launch the folders from the task system if the task was closed. – Peter Nov 13 '11 at 17:08
up vote 2 down vote accepted

You can create event receiver that will check that task is closed and disallow adding file and redirecting to custom page, where the details will be shown. Please check the article related how to implement in in SP2007 -

But in my opinion archiving process will be better, as @Kit Menke suggested.

share|improve this answer
This sounds like it could work. Per @Sig Weber I'll also need to disable viewing in windows explorer and DataSheet view, but putting in a custom event receiver sounds plausible. – Peter Nov 13 '11 at 17:12

Hmmm, I'm leaning towards a custom EventReceiver which fires on ItemAdding, ItemUpdating and ItemDeleting and checking the folder metadata if it is marked as "closed".

If so, any operation is denied and a custom error message is returned.

This would also require to disable DataSheet view and opening in Windows Explorer as those do not allow to display custom error messages.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.