Zdravím,
používáme live distribuci Debianu a kvůli podpoře dohledového systému Nagios bychom potřebovali, aby uživatel "nagios" měl přístup do adresáře "/usr/lib/nagios-plugins". Je možné to nějak zařídit? Zjistil jsem, že Debian bude mít přístup nějakým způsobem blokován pro uživatele jiné než root. Přitom práva pro ostatní jsou stanovena na čtení a spouštění, takže z tohoto pohledu by být problém neměl.
Díky za pomoc.
Zkus chown nagios:nagios -R /usr/lib/nagios-plugins - tím změníš složce /usr/lib/nagios-plugins a veškerýmu jejímu obsahu vlastníka z roota na nagios.
Změnil jsem vlastníka, ale bohužel bez výsledku. :( Nemělo by být potřeba změnit vlastníka taky adresářům ve struktuře nad touto složkou?
Nějaké nápady ještě?
Citace od: Petr S. kdy 15. 02. 2012, 16:53:59...Nemělo by být potřeba změnit vlastníka taky adresářům ve struktuře nad touto složkou?
To rozhodně ne. Uživatel nagios už vlastní /usr/lib/nagios-plugins a všechno, co ta složka obsahuje. Může onen uživatel do souborů a složek v /usr/lib/nagios-plugins taky zapisovat?
Souhlasím s Romanem, nic jiného neměnit. Dej sem prosím výpis z:
ls -la /usr/lib/nagios-plugins
Třeba pak budeme chytřejší :-)
Zde zasílám ls (v cestě jsem předtím udělal chybu, správně je ta cesta níže):
ls -la /usr/lib/nagios/plugins/
total 1784
drwxr-xr-x 2 nagios nagios 1500 Oct 6 14:33 .
drwxr-xr-x 4 root root 60 Oct 6 14:33 ..
-rwxr-xr-x 1 nagios nagios 34896 May 22 2011 check_apt
-rwxr-xr-x 1 nagios nagios 5369 May 22 2011 check_bgpstate
-rwxr-xr-x 1 nagios nagios 2242 May 22 2011 check_breeze
-rwxr-xr-x 1 nagios nagios 39796 May 22 2011 check_by_ssh
lrwxrwxrwx 1 nagios nagios 9 Oct 6 14:33 check_clamd -> check_tcp
-rwxr-xr-x 1 nagios nagios 26896 May 22 2011 check_cluster
-rwxr-xr-x 1 nagios nagios 38996 May 22 2011 check_dhcp
-rwxr-xr-x 1 nagios nagios 35268 May 22 2011 check_dig
-rwxr-xr-x 1 nagios nagios 47640 May 22 2011 check_disk
-rwxr-xr-x 1 nagios nagios 8726 May 22 2011 check_disk_smb
-rwxr-xr-x 1 nagios nagios 39828 May 22 2011 check_dns
-rwxr-xr-x 1 nagios nagios 24300 May 22 2011 check_dummy
-rwxr-xr-x 1 nagios nagios 3053 May 22 2011 check_file_age
-rwxr-xr-x 1 nagios nagios 6315 May 22 2011 check_flexlm
-rwxr-xr-x 1 nagios nagios 37124 May 22 2011 check_fping
lrwxrwxrwx 1 nagios nagios 9 Oct 6 14:33 check_ftp -> check_tcp
-rwxr-xr-x 1 nagios nagios 30944 May 22 2011 check_game
lrwxrwxrwx 1 nagios nagios 10 Oct 6 14:33 check_host -> check_icmp
-rwxr-xr-x 1 nagios nagios 34852 May 22 2011 check_hpjd
-rwxr-xr-x 1 nagios nagios 92852 May 22 2011 check_http
-rwxr-xr-x 1 nagios nagios 43544 May 22 2011 check_icmp
-rwxr-xr-x 1 nagios nagios 29056 May 22 2011 check_ide_smart
-rwxr-xr-x 1 nagios nagios 15134 May 22 2011 check_ifoperstatus
-rwxr-xr-x 1 nagios nagios 12598 May 22 2011 check_ifstatus
lrwxrwxrwx 1 nagios nagios 9 Oct 6 14:33 check_imap -> check_tcp
-rwxr-xr-x 1 nagios nagios 6887 May 22 2011 check_ircd
lrwxrwxrwx 1 nagios nagios 9 Oct 6 14:33 check_jabber -> check_tcp
-rwxr-xr-x 1 nagios nagios 35076 May 22 2011 check_ldap
lrwxrwxrwx 1 nagios nagios 10 Oct 6 14:33 check_ldaps -> check_ldap
-rwxr-xr-x 1 nagios nagios 3407 May 22 2011 check_linux_raid
-rwxr-xr-x 1 nagios nagios 29744 May 22 2011 check_load
-rwxr-xr-x 1 nagios nagios 6026 May 22 2011 check_log
-rwxr-xr-x 1 nagios nagios 20284 May 22 2011 check_mailq
-rwxr-xr-x 1 nagios nagios 30736 May 22 2011 check_mrtg
-rwxr-xr-x 1 nagios nagios 29232 May 22 2011 check_mrtgtraf
-rwxr-xr-x 1 nagios nagios 39108 May 22 2011 check_mysql
-rwxr-xr-x 1 nagios nagios 37348 May 22 2011 check_mysql_query
-rwxr-xr-x 1 nagios nagios 31008 May 22 2011 check_nagios
lrwxrwxrwx 1 nagios nagios 9 Oct 6 14:33 check_nntp -> check_tcp
lrwxrwxrwx 1 nagios nagios 9 Oct 6 14:33 check_nntps -> check_tcp
-rwxr-xr-x 1 nagios nagios 43236 May 22 2011 check_nt
-rwxr-xr-x 1 nagios nagios 39956 May 22 2011 check_ntp
-rwxr-xr-x 1 nagios nagios 39124 May 22 2011 check_ntp_peer
-rwxr-xr-x 1 nagios nagios 35892 May 22 2011 check_ntp_time
-rwxr-xr-x 1 nagios nagios 55828 May 22 2011 check_nwstat
-rwxr-xr-x 1 nagios nagios 8326 May 22 2011 check_oracle
-rwxr-xr-x 1 nagios nagios 34884 May 22 2011 check_overcr
-rwxr-xr-x 1 nagios nagios 33540 May 22 2011 check_pgsql
-rwxr-xr-x 1 nagios nagios 41508 May 22 2011 check_ping
lrwxrwxrwx 1 nagios nagios 9 Oct 6 14:33 check_pop -> check_tcp
-rwxr-xr-x 1 nagios nagios 43252 May 22 2011 check_procs
-rwxr-xr-x 1 nagios nagios 33588 May 22 2011 check_radius
-rwxr-xr-x 1 nagios nagios 33332 May 22 2011 check_real
-rwxr-xr-x 1 nagios nagios 9581 May 22 2011 check_rpc
lrwxrwxrwx 1 nagios nagios 10 Oct 6 14:33 check_rta_multi -> check_icmp
-rwxr-xr-x 1 nagios nagios 1137 May 22 2011 check_sensors
lrwxrwxrwx 1 nagios nagios 9 Oct 6 14:33 check_simap -> check_tcp
-rwxr-xr-x 1 nagios nagios 53796 May 22 2011 check_smtp
-rwxr-xr-x 1 nagios nagios 80368 May 22 2011 check_snmp
lrwxrwxrwx 1 nagios nagios 9 Oct 6 14:33 check_spop -> check_tcp
-rwxr-xr-x 1 nagios nagios 30756 May 22 2011 check_ssh
lrwxrwxrwx 1 nagios nagios 9 Oct 6 14:33 check_ssmtp -> check_tcp
-rwxr-xr-x 1 nagios nagios 32032 May 22 2011 check_swap
-rwxr-xr-x 1 nagios nagios 43444 May 22 2011 check_tcp
-rwxr-xr-x 1 nagios nagios 32484 May 22 2011 check_time
lrwxrwxrwx 1 nagios nagios 9 Oct 6 14:33 check_udp -> check_tcp
-rwxr-xr-x 1 nagios nagios 38980 May 22 2011 check_ups
-rwxr-xr-x 1 nagios nagios 29088 May 22 2011 check_users
-rwxr-xr-x 1 nagios nagios 2936 May 22 2011 check_wave
-rwxr-xr-x 1 nagios nagios 32464 May 22 2011 negate
-rwxr-xr-x 1 nagios nagios 29200 May 22 2011 urlize
-rw-r--r-- 1 nagios nagios 1938 May 22 2011 utils.pm
-rwxr-xr-x 1 nagios nagios 862 May 22 2011 utils.sh
Výpis je přes roota, když dám su nagios, tak mi to řekne, že nemám přístup.
Mně se nezdá, že by ten adresář měl mít vlastníka nagios:nagios, protože podle návodu níže má root:root a určo jim to funguje. Zkus to tedy projít podle těchto stránek a jestli ještě není problém v konfiguraci Nagiosu:
http://www.howtoforge.com/server-monitoring-with-icinga-on-debian-squeeze-p2 (http://www.howtoforge.com/server-monitoring-with-icinga-on-debian-squeeze-p2)
a zde ještě něco o Nagiosu a instalaci v Debianu:
http://www.debianhelp.co.uk/nagiosinstall.htm (http://www.debianhelp.co.uk/nagiosinstall.htm)
Debian serverů máme více a vždycky to fungovalo správně a s tímhle se nemuselo nic dělat, jen tady (jediný rozdíl na který jsem přišel je ten, že tohle je Debian Live ( http://live.debian.net/ ), ostatní jsou klasické Squeeze. Zjistil jsem, že na všech routerech s Debianem Live (je jich víc, ale na těchto nemáme Nagios, proto jsme o tomto problému nevěděli a neřešili jej), které máme to funguje takhle - do adresáře /usr má přístup jenom root, ale ne ostatní uživatelé.
Dočasně jsem problém vyřešil tedy tím, že jsem daný adresář přesunul do složky /home a v konfiguraci nagiosu jsem tento adresář změnil. Vše takto funguje, jen bych rád věděl, čím to je - pro případ, že by se v budoucnu vyskytl podobný problém, který by nebyl takhle jednoduše řešitelný jako je přesun složky někam jinam.
Zatím díky vše za rady.
Nějaký nápad?