when we install HDF mpack we do the following steps
yum install ambari-server
ambari-server install-mpack --mpack=/path/to/hdf-mpack --purge --verbose
The permissions and ownership for stacks , common-services etc is set correctly during ambari-server setup
Ambari-server daemon is configured to run under user 'slava'. Change this setting [y/n] ? n
Adjusting ambari-server permissions and ownership...
However, to add HDF services to HDP cluster we install the mpack after deploying the HDP cluster and hence when running Ambari as non-root and with umask = 0027, the permissions and ownerships don't get updated.
Re-run ambari-server setup command after installing the HDF mpack but don't really make any config changes. Run this step only to update the permissions.
ambari-server setup -s