[smokeping-users] Permission problem on master server

Ackermann, Tobias Tobias.Ackermann at kiongroup.com
Tue Jul 7 13:13:37 CEST 2015


It is working!

Many many thanks.


Von: Darren Murphy [mailto:darren at victoriajd.com]
Gesendet: Dienstag, 7. Juli 2015 10:47
An: Ackermann, Tobias
Cc: Greg Sloop; smokeping-users at lists.oetiker.ch
Betreff: Re: [smokeping-users] Permission problem on master server

From what you've pasted below, your apache user (presumably www-data) still does not have permission to write to /var/lib/smokeping

chown -R smokeping:www-data /var/lib/smokeping
.. should fix that.


On 7 July 2015 at 16:33, Ackermann, Tobias <Tobias.Ackermann at kiongroup.com<mailto:Tobias.Ackermann at kiongroup.com>> wrote:
Hello all,

the problem is still occurring. ☹

Has anyone an idea how I have to change the permissions for the folder that the “Permission denied” error is no longer occurring?


[Tue Jul  7 10:29:03 2015] smokeping.cgi [client 10.126.210.101]: Could not lock /var/lib/smokeping//services/DNS/ns3.smokeping-slave2.slave_cache (Permission denied). Trying again 2 more times.
[Tue Jul  7 10:29:04 2015] smokeping.cgi [client 10.126.210.101]: Could not lock /var/lib/smokeping//services/DNS/ns3.smokeping-slave2.slave_cache (Permission denied). Trying again 1 more times.
[Tue Jul  7 10:29:04 2015] smokeping.cgi [client 10.126.210.101]: Could not update /var/lib/smokeping//services/DNS/ns3.smokeping-slave2.slave_cache, giving up for now. at /usr/share/perl5/Smokeping/Master.pm line 156.



root at smokeping-master:/var/lib# cd /var/lib/
root at smokeping-master:/var/lib# ls -l
total 104
drwxr-xr-x 5 smokeping www-data 4096 Jul  1 14:16 apt
drwxr-xr-x 2 smokeping www-data 4096 Jul  1 13:52 aptitude
drwxr-xr-x 2 smokeping www-data 4096 Jul  1 13:45 dhcp
drwxr-xr-x 4 smokeping www-data 4096 Jul  1 13:59 dictionaries-common
drwxr-xr-x 8 smokeping www-data 4096 Jul  1 14:16 dpkg
drwxr-xr-x 2 smokeping www-data 4096 Jul  7 09:11 exim4
drwxr-xr-x 2 smokeping www-data 4096 Jul  1 13:46 initramfs-tools
drwxr-xr-x 2 smokeping www-data 4096 Jul 14  2013 initscripts
drwxr-xr-x 2 smokeping www-data 4096 Jul 14  2013 insserv
drwxr-xr-x 2 smokeping www-data 4096 Jul  1 14:00 ispell
drwxrwsr-x 2 smokeping www-data 4096 Dec 11  2012 libuuid
drwxr-xr-x 2 smokeping www-data 4096 Jul  2 06:25 logrotate
drwxr-xr-x 2 smokeping www-data 4096 Dec  4  2013 misc
drwxr-xr-x 2 smokeping www-data 4096 Jul  7 06:25 mlocate
drwxr-xr-x 5 smokeping www-data 4096 Jul  1 14:02 nfs
drwxr-xr-x 2 smokeping www-data 4096 Apr 28  2013 os-prober
drwxr-xr-x 2 smokeping www-data 4096 Jul  1 13:44 pam
lrwxrwxrwx 1 smokeping www-data   18 Jul  1 13:59 python-support -> /usr/lib/pymodules
drwxr-xr-x 2 smokeping www-data 4096 Jul  1 14:00 sgml-base
drwxrwxr-x 8 smokeping root     4096 Jul  7 08:23 smokeping
drwxr-xr-x 3 smokeping www-data 4096 Jul  1 13:59 tex-common
drwxr-xr-x 3 smokeping www-data 4096 Jul  1 14:01 ucf
drwxr-xr-x 2 smokeping www-data 4096 Nov 23  2012 update-rc.d
drwxr-xr-x 2 smokeping www-data 4096 Jul  1 13:44 urandom
drwxr-xr-x 2 smokeping www-data 4096 Jul  1 13:46 usbutils
drwxr-xr-x 3 smokeping www-data 4096 Jul  1 13:45 vim
drwxr-xr-x 2 smokeping www-data 4096 Jul  1 14:00 xml-core


root at smokeping-master:/var/lib/smokeping# ls -l
total 24
drwxrwsr-x 2 smokeping root 4096 Mar 17  2013 __cgi
drwxrwxr-x 5 smokeping root 4096 Jul  1 20:57 Main
drwxrwxr-x 5 smokeping root 4096 Jul  7 08:23 Systems
drwxrwxr-x 2 smokeping root 4096 Jul  7 09:15 Local
drwxrwxr-x 6 smokeping root 4096 Jul  7 08:02 services
drwxrwxr-x 2 smokeping root 4096 Jul  7 10:31 __sortercache
root at smokeping-master:/var/lib/smokeping#


Regards
Tobias


Von: Ackermann, Tobias
Gesendet: Freitag, 3. Juli 2015 21:00
An: 'Greg Sloop'; smokeping-users at lists.oetiker.ch<mailto:smokeping-users at lists.oetiker.ch>
Betreff: AW: [smokeping-users] Permission problem on master server

Hi Greg,

root at smokeping-master:/var/lib/smokeping/Local# chmod g+w :/var/lib/smokeping/Local
chmod: cannot access `:/var/lib/smokeping/Local': No such file or directory

So I run following command on master and slave without any error:

root at smokeping-master:/var/lib/smokeping/Local# chmod g+w -R /var/lib/smokeping/*


Now I can’t find an new error in the apache log file (since the last 15 minutes) but I’m still not seeing the Graph on the website from the master ☹

Any idea?

Thanks.
Tobias

Von: smokeping-users [mailto:smokeping-users-bounces+tobias.ackermann=kion-ims.com at lists.oetiker.ch] Im Auftrag von Gregory Sloop
Gesendet: Freitag, 3. Juli 2015 20:12
An: smokeping-users at lists.oetiker.ch<mailto:smokeping-users at lists.oetiker.ch>
Betreff: Re: [smokeping-users] Permission problem on master server

So, it looks like Apache doesn't have rights to create the cache directory.

See:
drwxr-xr-x 2 smokeping www-data    4096 Jul  1 14:28 .
drwxr-xr-x 6 smokeping www-data    4096 Jul  1 14:28 ..

So, assuming I'm right:
chmod g+w :/var/lib/smokeping/Local

This would make that directory RW for the group [www-data]

However, I'll be surprised if the slaves can write to the RRD's either, since they're also r-- for the group, so you'll probably want to use the same chmod command on them.

-Greg

Thank you for your reply.

root at smokeping-master:~# ls -al /var/lib/smokeping/Local/LocalMachine.smokeping-slave1.slave_cache
ls: cannot access /var/lib/smokeping/Local/LocalMachine.smokeping-slave1.slave_cache: No such file or directory

If I run it in this way I got the following output:

root at smokeping-master:/var/lib/smokeping/Local# ls -al
total 11688
drwxr-xr-x 2 smokeping www-data    4096 Jul  1 14:28 .
drwxr-xr-x 6 smokeping www-data    4096 Jul  1 14:28 ..
-rw-r--r-- 1 smokeping www-data 2986808 Jul  3 20:02 LocalMachine.rrd
-rw-r--r-- 1 smokeping www-data 2986808 Jul  1 14:28 LocalMachine~smokeping-slave1.rrd
-rw-r--r-- 1 smokeping www-data 2986808 Jul  1 14:28 LocalMachine~smokeping-slave2.rrd
-rw-r--r-- 1 smokeping www-data 2986808 Jul  1 14:28 LocalMachine~smokeping-slave3.rrd
root at smokeping-master:/var/lib/smokeping/Local#


Thank you and regards
Tobias


Von: smokeping-users [mailto:smokeping-users-bounces+tobias.ackermann=kion-ims.com at lists.oetiker.ch] Im Auftrag von Gregory Sloop
Gesendet: Freitag, 3. Juli 2015 18:10
An: smokeping-users at lists.oetiker.ch<mailto:smokeping-users at lists.oetiker.ch>
Betreff: Re: [smokeping-users] Permission problem on master server

What's the result of:

ls -al /var/lib/smokeping//Local/LocalMachine.smokeping-slave1.slave_cache


AT> Hello all,
AT>
AT> I think I have a problem with the permissions on the master system for /var/lib/smokeping/
AT>
AT> The config is wokring on the Slave system :
AT>
AT> root at smokeping-slave1:~# smokeping -restart
AT> --master-url=http://10.16.0.91/smokeping/smokeping.cgi
AT> --cache-dir=/var/smokeping/
AT> --shared-secret=/var/smokeping/secret.txt
AT> Sent data to Server and got new config in response.
AT> Note: logging to syslog as local0/info.
AT> Daemonizing /usr/sbin/smokeping ...
AT> root at smokeping-slave1:~#
AT>
AT> Debug mode tell me also  “Sent data to Server. Server said OK”.
AT>
AT> But if I have a look to the apache error log
AT> (/var/log/apache2/error.log)on the master Server I found this errors:
AT>
AT> [Wed Jul  1 20:37:37 2015] smokeping.cgi [client 10.16.10.108]:
AT> Could not lock
AT> /var/lib/smokeping//Local/LocalMachine.smokeping-slave1.slave_cache
AT> (Permission denied). Trying again 2 more times.
AT> [Wed Jul  1 20:37:38 2015] smokeping.cgi [client 10.16.10.108]:
AT> Could not lock
AT> /var/lib/smokeping//Local/LocalMachine.smokeping-slave1.slave_cache
AT> (Permission denied). Trying again 1 more times.
AT> [Wed Jul  1 20:37:38 2015] smokeping.cgi [client 10.16.10.108]:
AT> Could not update
AT> /var/lib/smokeping//Local/LocalMachine.smokeping-slave1.slave_cache,
AT> giving up for now. at /usr/share/perl5/Smokeping/Maste.....
AT> And many many more entries.
AT>
AT> I think I have to change the permission for the folder
AT> /var/lib/Smokeping/ but I don’t now with which permissions for which user.

AT> Here the permissions for the folders:
AT>
AT> root at smokeping-master:/var/lib# ls -l
AT> total 104
AT> drwxr-xr-x 5 root      root      4096 Jul  1 14:16 apt
AT> drwxr-xr-x 2 root      root      4096 Jul  1 13:52 aptitude
AT> drwxr-xr-x 2 root      root      4096 Jul  1 13:45 dhcp
AT> drwxr-xr-x 4 root      root      4096 Jul  1 13:59 dictionaries-common
AT> drwxr-xr-x 8 root      root      4096 Jul  1 14:16 dpkg
AT> drwxr-xr-x 2 root      root      4096 Jul  1 14:02 exim4
AT> drwxr-xr-x 2 root      root      4096 Jul  1 13:46 initramfs-tools
AT> drwxr-xr-x 2 root      root      4096 Jul 14  2013 initscripts
AT> drwxr-xr-x 2 root      root      4096 Jul 14  2013 insserv
AT> drwxr-xr-x 2 root      root      4096 Jul  1 14:00 ispell
AT> drwxrwsr-x 2 libuuid   libuuid   4096 Dec 11  2012 libuuid
AT> drwxr-xr-x 2 root      root      4096 May 17  2012 logrotate
AT> drwxr-xr-x 2 root      root      4096 Dec  4  2013 misc
AT> drwxr-xr-x 2 root      root      4096 Sep 25  2010 mlocate
AT> drwxr-xr-x 5 statd     nogroup   4096 Jul  1 14:02 nfs
AT> drwxr-xr-x 2 root      root      4096 Apr 28  2013 os-prober
AT> drwxr-xr-x 2 root      root      4096 Jul  1 13:44 pam
AT> lrwxrwxrwx 1 root      root        18 Jul  1 13:59 python-support -> /usr/lib/pymodules
AT> drwxr-xr-x 2 root      root      4096 Jul  1 14:00 sgml-base
AT> drwxr-xr-x 6 smokeping smokeping 4096 Jul  1 14:28 smokeping
AT> drwxr-xr-x 3 root      root      4096 Jul  1 13:59 tex-common
AT> drwxr-xr-x 3 root      root      4096 Jul  1 14:01 ucf
AT> drwxr-xr-x 2 root      root      4096 Nov 23  2012 update-rc.d
AT> drwxr-xr-x 2 root      root      4096 Jul  1 13:44 urandom
AT> drwxr-xr-x 2 root      root      4096 Jul  1 13:46 usbutils
AT> drwxr-xr-x 3 root      root      4096 Jul  1 13:45 vim
AT> drwxr-xr-x 2 root      root      4096 Jul  1 14:00 xml-core
AT>
AT>
AT> root at smokeping-master:/var/lib/smokeping# ls -l
AT> total 16
AT> drwxrwsr-x 2 smokeping www-data  4096 Mar 17  2013 __cgi
AT> drwxr-xr-x 5 smokeping smokeping 4096 Jul  1 20:57 All
AT> drwxr-xr-x 2 smokeping smokeping 4096 Jul  1 14:28 Local
AT> drwxr-xr-x 2 smokeping smokeping 4096 Jul  1 21:13 __sortercache
AT>
AT>
AT> root at smokeping-master:/var/lib/smokeping/Local# ls -l
AT> total 11680
AT> -rw-r--r-- 1 smokeping smokeping 2986808 Jul  1 21:18 LocalMachine.rrd
AT> -rw-r--r-- 1 smokeping smokeping 2986808 Jul  1 14:28
AT> LocalMachine~smokeping-slave1.rrd
AT> -rw-r--r-- 1 smokeping smokeping 2986808 Jul  1 14:28
AT> LocalMachine~smokeping-slave2.rrd
AT> -rw-r--r-- 1 smokeping smokeping 2986808 Jul  1 14:28
AT> LocalMachine~smokeping-slave3.rrd
AT> root at smokeping-master:/var/lib/smokeping/Local#




KION Information Management Services GmbH, Sitz der Gesellschaft: Wiesbaden, Registergericht: Wiesbaden HRB 22949, USt-Id-Nr. DE 254777238, Geschäftsführung: Dr. Walter Grüner

_______________________________________________
smokeping-users mailing list
smokeping-users at lists.oetiker.ch<mailto:smokeping-users at lists.oetiker.ch>
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users



KION Information Management Services GmbH, Sitz der Gesellschaft: Wiesbaden, Registergericht: Wiesbaden HRB 22949, USt-Id-Nr. DE 254777238, Geschäftsführung: Dr. Walter Grüner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oetiker.ch/pipermail/smokeping-users/attachments/20150707/fd34ed91/attachment-0001.html>


More information about the smokeping-users mailing list