get permissions from basedoc if not defined
removes generated doc files