I am new to brew and have been trying to figure this out myself but I’m currently stuck.
Trying to install the brew from https://github.com/sidaf/homebrew-pentest/blob/master/dirb.rb. The install fails because it can’t copy the extracted source to a new directory to work from. Running brew with --verbose shows me this is where it fails:
tar xof /Users/t1v0/Library/Caches/Homebrew/downloads/909dd856145ab18654a4e71ceb4f22cebcead82af6346b217b84864203a2e05a--dirb222.tar.gz -C /private/tmp/d20190411-16894-1yuspyk cp -pR /private/tmp/d20190411-16894-1yuspyk/dirb222/. /private/tmp/dirb-20190411-16894-i9ngay/dirb222 cp: /private/tmp/d20190411-16894-1yuspyk/dirb222/.: Permission denied
Looking at the permissions of /private/tmp/d20190411-16894-1yuspyk shows:
drw-r--r-- 24 t1v0 wheel 768 19 Nov 2014 dirb222
the brew formula tries to set the correct permissions using
system "chmod", "-R", "744", "dirb222"
but this fails before it even gets there. Ideas?