Support Questions
Find answers, ask questions, and share your expertise

Issue with cloudera agent to run as single user

Issue with cloudera agent to run as single user

New Contributor

While installing cloudera agent using RPM to run as single user. There is issue with init.d/clouder-scm-agent script. After setting USER and GROUP variables we have to change the line 


install -d -o $CMF_DIR_OWNER -g $CMF_DIR_OWNER /var/run/cloudera-scm-agent




install -d -o $USER -g $GROUP /var/run/cloudera-scm-agent


If user and group name is different, above line will fail to create/var/run/cloudera-scm-agent directory and cmf code will complain about this


File "/usr/lib64/cmf/agent/build/env/bin/cmf-agent", line 12, in <module>
load_entry_point('cmf==5.12.1', 'console_scripts', 'cmf-agent')()
File "/usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.12.1-py2.7.egg/cmf/", line 3102, in main
File "/usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.12.1-py2.7.egg/cmf/", line 3083, in main_impl
File "/usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.12.1-py2.7.egg/cmf/", line 512, in configure
File "/usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.12.1-py2.7.egg/cmf/", line 2042, in mkworkdir
created = self.mkabsdir(d, user=user, group=group, mode=0751)
File "/usr/lib64/cmf/agent/build/env/lib/python2.7/site-packages/cmf-5.12.1-py2.7.egg/cmf/", line 2070, in mkabsdir
File "/usr/lib64/python2.7/", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/run/cloudera-scm-agent'