<html><head><title>Permissions script idea</title>
</head>
<body>
<br><br>
<table>
<tr>
<td width=3 bgcolor= #0000ff><br>
</td>
<td><span style=" font-family:'calibri'; font-size: 11pt;">Smokeping usage and install problems:<br>
The problems boil down to;<br>
1) Smokeping itself [or more clearly, the user smokeping is running as - and remember it may run as root at the CLI, but as something different when started by the system] can't write to the RRDs or the directory where the RRD's are to be stored. <br>
2) The web-server can't *read* the RRD's because it doesn't have rights.<br>
 <br>
[far less common, but the same base issue]<br>
3) In master/slave setups - the slaves [via the web-server] can't write to the RRD's - because the web-server doesn't have rights to the RRDs.<br>
 <br>
These errors are so common, ti would be nice to have a small script that would run a quick audit/check on all permissions!<br>
 <br>
I have an install that ran fine for years, and then on a system & Tomcat upgrade now has permissions problems - .cgi access permissions denied.</td>
</tr>
</table>
<br><br>
<span style=" font-family:'Courier New'; font-size: 9pt;">I don't know if it would even be possible to do, given all the variances between distros etc. [Some using systemd some not, etc.]<br>
<br>
The script would have to determine what user the webserver [there might be more than one installed] was running as, look in the smokeping config, see what RRD's exist in the config, and then go see if it could access the files as that user. [And what if the files hadn't been created yet?]<br>
<br>
It would be perhaps easier to do this for the smokeping user - but even then it would have to look at systemd data to see who smokeping was running as and do those same checks.<br>
I wouldn't have the slightest idea where to start to write such a script.<br>
<br>
Seems like a pretty involved "small" script, IMO. :)<br>
It *would* be cool though. <br>
[I'd like a pony too, as long as we're wishing!]<br>
<br>
One would hope that the kinds of people who would run smokeping [namely sysadmins] would have enough skill to find their way through this problem. [Though, obviously that's not so much the case - so perhaps I'm tilting at windmills.]<br>
<br>
-Greg<br>
</body></html>