Unable to install Chef-server

I am trying to install chef server on RHEL 7.1 and I am getting an issue

ERROR: Your private key could not be loaded from /etc/opscode/pivotal.pem
Check your configuration file and ensure that your private key is readable

when I am trying to create a user for the chef-server and the file pivotal.pem is not present in that path.

I am not an expert.
Have you tried giving read permission to the pem file? Try executing “sudo chmod 644 /etc/opscode/pivotal.pem”

pivotal.pem file is not available in that path to change permissions.

Are you running “rpm -Uvh chef-server-core-x.x.x.rpm” as sudo user?
You might not have write permissions on /etc/opscode folder. Try running “sudo chmod 666 /etc/opscode”

ERROR: Your private key could not be loaded from /etc/opscode/pivotal.pem
Check your configuration file and ensure that your private key is readable

when I am trying to create a user for the chef-server and the file
pivotal.pem is not present in that path.

Are you using chef-server-ctl add-user, or trying to use knife directly?

Hi Manish,
Thanks for your response, I am running rpm -UVH chef-server-core-x.x.x.rpm as root user. I am not sure but my question is chef itself creates the folder opscode and I found proper permissions to the folder.

I am trying to create user using the chef-server-ctl command.