-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RRD files not removed when deleting device #68
Comments
This can be solved with two ways...
Method 1 would require an additional |
Does 1) do what we need? I've just given it a quick test by creating a folder as root, setting suid then trying to create a file within that folder and it doesn't work :( |
sorry it was sgid hehe
Note: That umask is just Quick'n'Dirty, would put more than 1s thought into it for productive ;) |
I'm struggling to get this working in an install, when the rrd directory is created the permissions still don't include group write access for www-data (apache in my case) to remove the directory. The rrd files within are also created with permissions which won't allow the web server user to remove them :( |
To me, it seems easier simply to mark the host as deleted, then let the poller clean up the RRDs and remove the entry from the database. |
shell_exec("rm -rf ".trim($config['rrd_dir'])."/$host"); This is included in So really the fix relies in POSIX permissions. I suggest:
If that's too much to ask for, we can add a very ugly |
Let's just forget you ever mentioned chmod 777 and move along. :-) |
lol, also those steps are manual for existing installs. What about dealing with it in the poller like blahdeblah said? May require another column to the DB though. |
yes, it requires another column. Not that it would be an issue, I just think that on the long-run we shouldnt let the poller run as root... it's not really sane... |
I fully agree that running the poller as root is undesirable, but I think that it may have to due to use of fping. |
@paulgear : fping has suid flag on upstream debian and centos. This shouldnt be an issue then I also recall somebody on the IRC saying he uses the cron as nonroot already.. Will ask for bugs or wether it works outofthebox |
Shorty from IRC said it worked outofthebox, he's running the cronjobs with same user as his apache. |
Is it worth looking at how we can migrate people to running as a non-root user? One of the challenges will be that we had in the docs to symlink the cron file for quite a while, this means if we updated that file then it would break a lot of installs. We could have a second cron file we reference from now on and have that as part of the instructions creating a librenms user (people can change this user). Thoughts? |
I agree - we need to aim for migrating the poller to non-root. |
@f0o would you mind re-opening the PR you did for this with a few changes: create a new file called cron.librenms (or another name that fits?) and also add a note to the top: # Using this cron file requires an additional user on your system, please see install docs. update the install docs to tell people to copy that new file rather than librenms.cron Add a note into librenms.cron that says: # It's recommended not to run this cron anymore - please see cron.librenms |
Ok, tested. works fine. Current installs will continue to function but instructions show how to install with separate user. |
So, Closing? |
Yeah :) |
Actually, still having issues with it removing rrd files :/ |
So @f0o actually I've had to make some changes. The device I tested it on had lax perms so it just deleted :/ umask(0000); chmod 776 rrd/ With those it now works for me - thoughts? |
All sorted thanks to @f0o :) |
This is still an issue FYI |
Yeah,just messed whole graphing for me. |
still have this issue |
It's most definitely a config issue. Be sure that the user running the GUI has enough privileges to delete files created by the librenms user. |
FYI, from new install docs:
|
This thread has been automatically locked since there has not been any recent activity after it was closed. |
When deleting a device from the web interface, the rrd files and directories aren't removed. This will be due to those folders and files being owned by the user that the poller runs as (root).
The text was updated successfully, but these errors were encountered: