AMBARI-8689. Fix multiple issues with custom commands and actions on non-root (aonishuk)