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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...