Getting Data In

Why am I getting a "/root/.splunk": Permission Denied error when running './splunk add forward-server ip:9997

Sudarshankumawa
Engager

Sudarshankumawa_0-1691505078527.png

While Forwarding Linux logs to Splunk I'm getting the error shown in the picture. Let me know if someone can me. I've setup Splunk Enterprise on ubuntu VM.

Labels (3)
0 Karma
1 Solution

VatsalJagani
SplunkTrust
SplunkTrust

@Sudarshankumawa - I see you are assigning the owner as vboxuser for Splunk but then running add forward-server command with root user.

I would use the user which is running Splunk for everything (running command, ownership of splunkforwarder should also be with that user).

 

I hope this helps!!!

View solution in original post

VatsalJagani
SplunkTrust
SplunkTrust

@Sudarshankumawa - I see you are assigning the owner as vboxuser for Splunk but then running add forward-server command with root user.

I would use the user which is running Splunk for everything (running command, ownership of splunkforwarder should also be with that user).

 

I hope this helps!!!

Sudarshankumawa
Engager

Hi Vatsal,
Thank you a million times over for your response. Can you provide me with any commands that are compatible with your approach and will address this issue?

0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

@Sudarshankumawa 

  • Stop Splunk first.
    • You will find which user is running Splunk right now with below command:
      • ps -aux | grep splunkd
  • Change ownership of files:
    • Run command with root user
      • chown -R <XYZ> /opt/splunkforwarder
    • Assuming you want to run splunk service with <XYZ> user.
  • Become the right user.
    • Run command with root user.
      • su <XYZ>
  • Start Splunk
    • /opt/splunkforwarder start

 

And then you should be able to do whatever you need with Splunk.

0 Karma
Get Updates on the Splunk Community!

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...