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

Is it possible, when you upload a document and put it in a library, to set automatically inherited rights from the library to this document ? Because, for the moment, when I upload a document (during page edit) it set only the administrator and the uploader in the authorizations. How can I resolve this problem ? Thank you with advance and sorry for my poor english.

share|improve this question
up vote 1 down vote accepted

you need to create an event receiver in the item adding event, then in that event you can set permissions your self with the SPFolder and SPFile classes.

Here is an example of more or less how can it be done

how to create an event receiver

share|improve this answer
Thank you very much ! But do you know if there is an easier way to set only inheritance rights ? It's sounds very strange to me that inheritance rights aren't set by default... Thank you again even so ! – cocoggu Feb 17 '12 at 13:55
actually by default inheritance rights are always Inherited, lol, thats the default behavior, your file will inherit the permissions of your document library, the doc library will inherit the permissions from your site, etc, etc. However you can break the inheritance manually at any time.. – Esteban V Feb 17 '12 at 13:57
Yes it is what I don't understand, when I upload a new file during page edit, only two users are set in rights : Portal admin and the uploader (or the creator of the document I don't know) and library have a long list of users inherited from my site... I'm a bit lost :) – cocoggu Feb 17 '12 at 14:04
Sorry for my poor english and ambiguities I'm french – cocoggu Feb 17 '12 at 14:05
Could it come from the template of the type of document ? – cocoggu Feb 17 '12 at 14:19

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.