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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...