[smokeping-users] Permission problem on master server

Gregory Sloop gregs at sloop.net
Fri Jul 3 20:11:34 CEST 2015


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
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#

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oetiker.ch/pipermail/smokeping-users/attachments/20150703/561849a4/attachment-0001.html>


More information about the smokeping-users mailing list