NHSDigital / ndr_dev_support

Development tools and security support for developers
MIT License
3 stars 4 forks source link

Capistrano: fix up installed gem permissions after deployment. #134

Closed bshand closed 2 months ago

bshand commented 2 months ago

Capistrano: fix up installed gem permissions after deployment.

This fixes permissions in the shared/bundle/ directory after deployment, to make it writeable by all deployers. We already set group permissions correctly in the bundle directory, but some gem installs ignore these permissions, so we need to fix them up. (I think they build files in $TMPDIR, and then move them across with the wrong group / user.) This is not immediately obvious as a problem, but sometimes makes it impossible for a single deployer to remove the installed gems for old ruby versions.

Capistrano: identify errors when installing out-of-bundle gems.