Skip to content
This repository has been archived by the owner on Jan 1, 2020. It is now read-only.

sensu-install does not make plugins excecutable #1168

Closed
runningman84 opened this issue Feb 18, 2016 · 6 comments
Closed

sensu-install does not make plugins excecutable #1168

runningman84 opened this issue Feb 18, 2016 · 6 comments

Comments

@runningman84
Copy link
Contributor

This looks like a bug to me:


ubuntu@ip-172-31-10-52: sudo sensu-install -P sensu-plugins-network-checks,sensu-plugins-load-checks,sensu-plugins-cpu-checks,sensu-plugins-process-checks,sensu-plugins-memory-checks,sensu-plugins-disk-checks,sensu-plugins-filesystem-checks,sensu-plugins-vmstats,sensu-plugins-io-checks
...

ubuntu@ip-172-31-10-52:/opt/sensu/embedded/bin$ ls -la
total 1252
drwxr-xr-x 2 root root   4096 Feb 18 15:17 .
drwxr-xr-x 7 root root   4096 Feb 18 14:45 ..
-rwxr-xr-x 1 root root  14646 Jan 29 20:07 autoconf
-rwxr-xr-x 1 root root   8516 Jan 29 20:07 autoheader
-rwxr-xr-x 1 root root  31821 Jan 29 20:07 autom4te
-rwxr-xr-x 1 root root  20280 Jan 29 20:07 autoreconf
-rwxr-xr-x 1 root root  17112 Jan 29 20:07 autoscan
-rwxr-xr-x 1 root root  33813 Jan 29 20:07 autoupdate
-rwxr-x--- 1 root root    522 Feb 18 15:17 aws.rb
-rwxr-x--- 1 root root    579 Feb 18 15:16 check-banner.rb
-rwxr-x--- 1 root root    591 Feb 18 15:16 check-checksums.rb
-rwxr-x--- 1 root root    576 Feb 18 15:16 check-cmd.rb
-rwxr-x--- 1 root root    564 Feb 18 15:16 check-cpu.rb
-rwxr-x--- 1 root root    564 Feb 18 15:16 check-cpu.sh
-rwxr-x--- 1 root root    591 Feb 18 15:16 check-dir-count.rb
-rwxr-x--- 1 root root    590 Feb 18 15:16 check-dir-size.rb
-rwxr-x--- 1 root root    574 Feb 18 15:16 check-disk-usage.rb
-rwxr-x--- 1 root root    593 Feb 18 15:16 check-file-exists.rb
-rwxr-x--- 1 root root    591 Feb 18 15:16 check-file-size.rb
-rwxr-x--- 1 root root    576 Feb 18 15:16 check-fstab-mounts.rb
...
@agoddard
Copy link

agoddard commented Mar 2, 2016

@runningman84 I can't replicate this - which version of Ubuntu are you using?

[SENSU-INSTALL] successfully installed Sensu plugins: ["sensu-plugins-network-checks", "sensu-plugins-load-checks", "sensu-plugins-cpu-checks", "sensu-plugins-process-checks", "sensu-plugins-memory-checks", "sensu-plugins-disk-checks", "sensu-plugins-filesystem-checks", "sensu-plugins-vmstats", "sensu-plugins-io-checks"]
vagrant@vagrant-debian-jessie:~$ ...
vagrant@vagrant-debian-jessie:~$ ls -al /opt/sensu/embedded/bin/
total 1252
drwxr-xr-x 2 root root   4096 Mar  2 02:22 .
drwxr-xr-x 7 root root   4096 Mar  2 02:21 ..
-rwxr-xr-x 1 root root  14646 Jan 29 20:07 autoconf
-rwxr-xr-x 1 root root   8516 Jan 29 20:07 autoheader
-rwxr-xr-x 1 root root  31821 Jan 29 20:07 autom4te
-rwxr-xr-x 1 root root  20280 Jan 29 20:07 autoreconf
-rwxr-xr-x 1 root root  17112 Jan 29 20:07 autoscan
-rwxr-xr-x 1 root root  33813 Jan 29 20:07 autoupdate
-rwxr-xr-x 1 root root    579 Mar  2 02:22 check-banner.rb
-rwxr-xr-x 1 root root    591 Mar  2 02:22 check-checksums.rb
-rwxr-xr-x 1 root root    576 Mar  2 02:22 check-cmd.rb
-rwxr-xr-x 1 root root    564 Mar  2 02:22 check-cpu.rb
-rwxr-xr-x 1 root root    564 Mar  2 02:22 check-cpu.sh
-rwxr-xr-x 1 root root    591 Mar  2 02:22 check-dir-count.rb
-rwxr-xr-x 1 root root    590 Mar  2 02:22 check-dir-size.rb
-rwxr-xr-x 1 root root    574 Mar  2 02:22 check-disk-usage.rb
-rwxr-xr-x 1 root root    593 Mar  2 02:22 check-file-exists.rb
-rwxr-xr-x 1 root root    591 Mar  2 02:22 check-file-size.rb
-rwxr-xr-x 1 root root    576 Mar  2 02:22 check-fstab-mounts.rb
-rwxr-xr-x 1 root root    593 Mar  2 02:22 check-fs-writable.rb
-rwxr-xr-x 1 root root    600 Mar  2 02:22 check-jsonwhois-domain-expiration.rb
-rwxr-xr-x 1 root root    568 Mar  2 02:22 check-load.rb
-rwxr-xr-x 1 root root    584 Mar  2 02:22 check-memory-percent.rb
-rwxr-xr-x 1 root root    576 Mar  2 02:22 check-memory.rb
-rwxr-xr-x 1 root root    587 Mar  2 02:22 check-mtime.rb
-rwxr-xr-x 1 root root    576 Mar  2 02:22 check-mtu.rb
-rwxr-xr-x 1 root root    589 Mar  2 02:22 check-multicast-groups.rb
-rwxr-xr-x 1 root root    584 Mar  2 02:22 check-netstat-tcp.rb
-rwxr-xr-x 1 root root    577 Mar  2 02:22 check-ping.rb
-rwxr-xr-x 1 root root    583 Mar  2 02:22 check-ports-nmap.rb
-rwxr-xr-x 1 root root    578 Mar  2 02:22 check-ports.rb
-rwxr-xr-x 1 root root    580 Mar  2 02:22 check-process.rb
-rwxr-xr-x 1 root root    588 Mar  2 02:22 check-process-restart.rb
-rwxr-xr-x 1 root root    573 Mar  2 02:22 check-ram.rb
-rwxr-xr-x 1 root root    576 Mar  2 02:22 check-rbl.rb
-rwxr-xr-x 1 root root    569 Mar  2 02:22 check-smart.rb
-rwxr-xr-x 1 root root    576 Mar  2 02:22 check-smart-status.rb
-rwxr-xr-x 1 root root    578 Mar  2 02:22 check-socat.rb
-rwxr-xr-x 1 root root    582 Mar  2 02:22 check-swap-percent.rb
-rwxr-xr-x 1 root root    574 Mar  2 02:22 check-swap.rb
-rwxr-xr-x 1 root root    586 Mar  2 02:22 check-tail.rb
-rwxr-xr-x 1 root root    586 Mar  2 02:22 check-threads-count.rb
-rwxr-xr-x 1 root root    602 Mar  2 02:22 check-whois-domain-expiration-multi.rb
-rwxr-xr-x 1 root root    596 Mar  2 02:22 check-whois-domain-expiration.rb
-rwxr-xr-x 1 root root  28016 Jan 29 20:14 chpst
-rwxr-xr-x 1 root root   4275 Jan 29 20:10 c_rehash
-rwxr-xr-x 1 root root    528 Mar  2 02:22 dnsbl-client
-rwxr-xr-x 1 root root   4853 Jan 29 20:14 erb
-rwxr-xr-x 1 root root    557 Jan 29 20:14 gem
-rwxr-xr-x 1 root root   4066 Jan 29 20:07 ifnames
-rwxr-xr-x 1 root root    201 Jan 29 20:14 irb
-rwxr-xr-x 1 root root    573 Mar  2 02:22 metrics-cpu-mpstat.rb
-rwxr-xr-x 1 root root    577 Mar  2 02:22 metrics-cpu-pcnt-usage.rb
-rwxr-xr-x 1 root root    566 Mar  2 02:22 metrics-cpu.rb
-rwxr-xr-x 1 root root    591 Mar  2 02:22 metrics-dirsize.rb
-rwxr-xr-x 1 root root    579 Mar  2 02:22 metrics-disk-capacity.rb
-rwxr-xr-x 1 root root    570 Mar  2 02:22 metrics-disk.rb
-rwxr-xr-x 1 root root    576 Mar  2 02:22 metrics-disk-usage.rb
-rwxr-xr-x 1 root root    592 Mar  2 02:22 metrics-filesize.rb
-rwxr-xr-x 1 root root    584 Mar  2 02:22 metrics-interface.rb
-rwxr-xr-x 1 root root    566 Mar  2 02:22 metrics-ioping.rb
-rwxr-xr-x 1 root root    575 Mar  2 02:22 metrics-iostat-extended.rb
-rwxr-xr-x 1 root root    570 Mar  2 02:22 metrics-load.rb
-rwxr-xr-x 1 root root    586 Mar  2 02:22 metrics-memory-percent.rb
-rwxr-xr-x 1 root root    578 Mar  2 02:22 metrics-memory.rb
-rwxr-xr-x 1 root root    580 Mar  2 02:22 metrics-netif.rb
-rwxr-xr-x 1 root root    578 Mar  2 02:22 metrics-net.rb
-rwxr-xr-x 1 root root    586 Mar  2 02:22 metrics-netstat-tcp.rb
-rwxr-xr-x 1 root root    591 Mar  2 02:22 metrics-nfsstat.rb
-rwxr-xr-x 1 root root    579 Mar  2 02:22 metrics-ping.rb
-rwxr-xr-x 1 root root    598 Mar  2 02:22 metrics-processes-threads-count.rb
-rwxr-xr-x 1 root root    589 Mar  2 02:22 metrics-process-status.rb
-rwxr-xr-x 1 root root    583 Mar  2 02:22 metrics-sockstat.rb
-rwxr-xr-x 1 root root    577 Mar  2 02:22 metrics-user-pct-usage.rb
-rwxr-xr-x 1 root root    560 Mar  2 02:22 metrics-vmstat.rb

@runningman84
Copy link
Contributor Author

This happens if you use the os-hardening cookbook which sets the default umask to 0027

@calebhailey
Copy link

Tagging this as a documentation issue.

@majormoses
Copy link
Contributor

@runningman84 yes I ran into the the same issue and reportyed it here: sensu/sensu-chef#523 I have solved this internally in my org and would love to discuss this further and see if we can come up with something good enough for other use cases (for example we are 100% linux and don't try to care to solve on other *nix or windows...)

@runningman84
Copy link
Contributor Author

I think the sensu-install script should just set the appropiate umask. If you compare this with deb or rpm packages they also ignore a system wide umask and set the file rights according to the package specs.

@majormoses
Copy link
Contributor

majormoses commented May 15, 2017

That makes sense when using sensu-install and might encourage a change in the cookbook to start using this as it would solve those problems without coming up with a chef specific solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants