Only emit permissions hook for files and and include path

Conflicts:
	lib/public/share.php