Getting Data In

How to set Execute rights for shell scripts on Windows Forwarder Management?

schose
Builder

Hi all,

I'm using Forwarder Management on a Splunk instance running on Windows. I've created an app to get some data inputs running shell scripts. When I distributed the app to the forwarders, the execute attribute -x is not set on the scripts, so they don't get executed. When manually setting the scripts using chmod 755 *.sh the inputs are generated.

Is there a way I could set the execute rights on the App for Linux inputs? Are there any post copy scripts i could execute after the app is deployed from Forwarder Management?

Cheers,

Andreas

0 Karma

esix_splunk
Splunk Employee
Splunk Employee

As mentioned, if you are using a *Nix based Deployment Server and pulling from Windows Machines, the permissions will not get copied over.

Your best bet here is to set execution rights on the $splunk_home/etc/apps folder, and enable "Inherit Permissions" with execute bit set. This should set the execution bit on all folders above $splunk_home/etc/apps. One side note to this, it does set execute on all files. If you are running a secured windows box, this might not be ideal.

In that case, you best bet would be to write a powershell script that will set execute on $splunk_home/etc/apps/*/bin/, and cron that to run frequently, or manually run this everytime you push an updated app..

mcronkrite
Splunk Employee
Splunk Employee

You can't do this to Windows Forwarders from a Linux Deployment server. You need a Windows Deployment Server to manage windows permissions / environment.

0 Karma

muebel
SplunkTrust
SplunkTrust

There is probably some utility to modify the permissions for the shell script while on a Windows system, but if I were you I would copy the file to a linux system, chmod it, then put it back into place on the deploy server.

Get Updates on the Splunk Community!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...