You may consider making the error message here more verbose and maybe honor --keep-going. %% emerge -e world --keep-going Calculating dependencies... done! >>> Verifying ebuild manifests >>> Starting parallel fetch >>> Emerging (1 of 77) sys-apps/portage-2.2.00.15027 <snip> Permission denied: 'makedirs('/binpkgs/sys-apps')' %% echo $? 13 Another option would be to check perms of $PKGDIR earlier in the process..?