Fix permissions in packages

Review 2055 by @larkost
Closes #2927