Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat Jun 24, 2017 8:48 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [HOWTO] Debug Windows NTFS permission problems
PostPosted: Tue Mar 04, 2008 8:37 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12118
Location: USA
[HOWTO] Debug Windows NTFS permission problems

This guide will help you locate NTFS permission problems with your Cacti installation. You will need to download Sysinternals Process Monitor.
  1. You need to run Process Monitor under an Administrator account so it will be able to capture all the events.
  2. Set up Process Monitor to capture all event types (registry, file and process)
    Image
  3. Filer menu -> Filter. Set the filters so we only see processes related to Cacti. You can either manually enter them in or download this registry file which has them pre-set for you. You’ll need to restart Process Monitor if you import the file.
    Image
  4. Filter menu -> Highlight. Set the filter to the Results column and contains denied, since this is the majority of where our issues will be.
    Image
  5. Now clear out all existing events (Edit -> Clear Display) and wait for the Cacti scheduled task to run.
  6. After the scheduled task has run, stop Process Monitor from collecting any more data (File -> Uncheck Capture Events).
  7. Since Access Denied errors will be the root of most of the problems, go to the Edit menu -> Find. Type in: denied.
Below are some common errors Users might run in to and their solutions.
  • php.exe CreateFile C:\php\extras\mibs\.index ACCESS DENIED
    Image
    Here we can see that PHP is denied creating the MIB .Index file, which it does on every polling cycle. This file maintains a list of all the MIB files in its directory. While this isn’t very important to Cacti’s functionality, it will be a problem if you ever add/remove MIB files from the directory. Double-clicking on the Event will bring up its details. Clicking on the Process tab, we can then see more about it:
    Image
    Here we can see that it was launched from “php C:\Inetpub\wwwroot\cacti\poller.php” which was our Cacti scheduled task (ignore the fact that the SYSTEM account is running it – it still has our scheduled task credentials).
    To fix the problem, grant Modify rights to your Cacti scheduled task user account to C:\php\extras\mibs\.index.
  • php.exe CreateFile C:\usr\SNMP\PERSIST\snmpapp.conf ACCESS DENIED
    Image
    Here we see PHP is denied creating the Net-SNMP config file (which really isn’t that important). Double-clicking on the Event will bring up its details. Clicking on the Process tab, we can then see more about it:
    Image
    You can see it was launched by Cacti to use the Script Server. Notice the User is QUAD\Cactiuser, which is the account my Cacti Scheduled Task runs under.
    To fix the problem, grant Modify rights to your Cacti scheduled task user account to C:\usr\SNMP\PERSIST\snmpapp.conf.
  • php.exe CreateFile C:\inetpub\wwwroot\cacti\log\cacti.log ACCESS DENIED
    Image
    Here we see PHP was denied creating/updating the Cacti log file. Double-clicking on the Event will bring up its details. Clicking on the Process tab, we can then see more about it:
    Image
    Here we can see that it was launched from “php C:\Inetpub\wwwroot\cacti\poller.php” which was our Cacti scheduled task (ignore the fact that the SYSTEM account is running it – it still has our scheduled task credentials).
    To fix the problem, grant Modify rights to your Cacti scheduled task user account to C:\inetpub\wwwroot\cacti\log\.
  • rrdtool.exe CreateFile C:\inetpub\wwwroot\cacti\rra\localhost_traffic_in_9.rrd ACCESS DENIED
    Image
    Here RRDTool is denied creating/updating the rra files after Cacti has collected data. This is obviously a must-have for Cacti to function properly. Double-clicking on the Event will bring up its details. Clicking on the Process tab, we can then see more about it:
    Image
    Notice the User is QUAD\Cactiuser, which is the account my Cacti Scheduled Task runs under.
    To fix the problem, grant Modify rights to your Cacti scheduled task user account to C:\inetpub\wwwroot\cacti\rra\.
  • inetinfo.exe CreateFile C:\WINDOWS\system32\cmd.exe ACCESS DENIED … Impersonating: QUAD\IUSR_QUAD
    Image
    This error occurs when you try to view a graph and nothing shows up. What happens is IIS attempts to invoke cmd.exe AS the configured Internet Guest Account (IUSR_QUAD in my case). Cmd.exe in turn would spawn rrdtool.exe. The key thing to notice is the fact the Impersonating User was denied access. Double-clicking on the Event will bring up its details.
    Image
    Ignore the fact the Operation was CreateFile, it was NOT trying to overwrite your cmd.exe! It’s the Desired Access portion which really matters since that dictates what it was trying to do. As you can see, it was merely trying to read/execute cmd.exe. Also take note of the Impersonating account it was attempted to run under.
    To fix the problem, grant Read/Execute rights to your Internet Guest Account (IUSR_) account to %WINDIR%\System32\CMD.exe and IIS_WPG (if you’re on Windows 2003 or greater).
  • inetinfo.exe CreateFile C:\php\sessiondata\sess_59add35a346b3f496299e4a6659bb18f ACCESS DENIED … Impersonating: QUAD\IUSR_QUAD
    Image
    You will also see something like the following on the Cacti logon page:
    Warning: Unknown: open(C:\PHP\sessiondata\sess_59add35a346b3f496299e4a6659bb18f, O_RDWR) failed: Permission denied (13) in Unknown on line 0
    Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\PHP\sessiondata) in Unknown on line 0

    This error occurs when your Internet Guest Account (IUSR_QUAD in my case), doesn’t have Modify permissions to files in the PHP session.save_path (C:\PHP\sessiondata by default).

    To fix the problem, grant Modify rights to your Internet Guest Account (IUSR_) account to C:\PHP\sessiondata to Files only.

More examples to be added as the need arises…

_________________

| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |


Top
 Profile  
 
 Post subject: Thank you
PostPosted: Thu Jul 10, 2008 10:05 am 
Offline

Joined: Thu Jul 10, 2008 10:03 am
Posts: 1
Location: College of Charleston
Thank you!

My cacti user needed permission to cmd.exe.

Great pictures. Your guide saved a lot of time.


Top
 Profile  
 
 Post subject: Process monitor
PostPosted: Wed Sep 03, 2008 5:29 am 
Offline

Joined: Wed Sep 03, 2008 1:03 am
Posts: 12
I installed process monitor , after running the server has gione into hung state.
What could be the issue.
The OS is windows 2k SP4 with Updated rollup1


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 03, 2008 3:21 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12118
Location: USA
well if the act of running process monitor locked up Windows, then it would be an issue with.... process monitor. I suggest you look/post your question on the Sysinternals forum describing the issue you experienced.

I recall having a similar problem once before too on a Win2K server.

_________________

| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |


Top
 Profile  
 
 Post subject: Re: [HOWTO] Debug Windows NTFS permission problems
PostPosted: Thu Nov 24, 2016 11:56 am 
Offline

Joined: Wed Nov 23, 2016 2:06 pm
Posts: 10
I'm sorry about this question but I'm new User in Cacti and I saw Ur solution about cacti but The parameters that U sees that We have to add in process Monitor. can't appear. Could U explein for dummies hot to do it. Please. :(


Attachments:
process_mon.jpg
process_mon.jpg [ 471.02 KiB | Viewed 2179 times ]
process_mon1.jpg
process_mon1.jpg [ 404.86 KiB | Viewed 2179 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group