Blog » SharePoint

800.705.0401 | 858.458.4222

LinkedInFacebookTwitterHershey Technologies RSS Feed

Contact Us | Careers 


 

Changing the Item-Level Permissions Settings for a Document Library requires PowerShell

Posted in [SharePoint 2010], [PowerShell] By Tom Castiglia

Today I decided that I needed to change the Item-Level Permissions settings for a document library so that users could only read the items that they had created.  For SharePoint lists, the Item-Level Permissions setting is easily configured under the list’s Advanced Settings section, like this:

 

image

 

However, when I went to the Advanced Settings section for my document library, there was no section for Item-Level Permissions.  I checked a few other lists and document libraries and confirmed that apparently most list types support this configuration, except for document libraries!

 

So my next question was whether Item-Level Permissions settings could not be changed in a document library at all, or whether these options were simply not displayed in the browser for the Advanced Settings in a library.  I figured the easiest way to determine this would be to attempt it with PowerShell in a test environment… if it was not supported, the PowerShell commands would simply fail to execute against my test document library.

 

As it turns out the, setting Item-Level Permissions in a library is fully supported with PowerShell!

 

The PowerShell commands for changing this are very simple:

$web = Get-SPWeb http://YourSite/
$list = $web.Lists[“Your Document Library Name”]
$list.ReadSecurity = 2
$list.Update()
$web.Dispose()

Note the 3rd line which is where you determine the value for this setting using the following values:

1 = “Read all items”

2 = “Read items that were created by the user”

 

If you wish to modify the values for Create and Edit access instead, replace .ReadSecurity with .WriteSecurity with the following values:

1 = “Create and edit All items”

2 = “Create items and edit items that were created by the user”

4 = “None”

 

For example:

$web = Get-SPWeb http://YourSite/
$list = $web.Lists[“Your Document Library Name”]
$list.WriteSecurity = 2
$list.Update()
$web.Dispose()

    Add a Comment

     [Quick Submit with Ctrl+Enter]