Partially revert 'Fix permissions in packages'

Review 2081 by @larkost
Merge branch 'next' into sam_2134_new_leaf