Summary: Issue when /opt is not writeable by root where mkdir can fail with permission denied but recursively we hit stack overflow since we never handle that case. This diff adds support for handling permission denied as well as some other common errors that might prevent us from ever creating directories (too many links, not enough space, invalid path).
Test Plan:
sudo chattr +i /opt
try to do yba-ctl install, ensure permission denied error is immediately thrown
Reviewers: dshubin, nsingh, sanketh
Reviewed By: dshubin
Subscribers: yugaware
Differential Revision: https://phorge.dev.yugabyte.com/D41214