If you put that open inside of metric_init, start gmond as root, then
the filehandle will be created before gmond drops it's privileges to
the user configured.

On Mon, Dec 6, 2010 at 4:16 PM, Antonio Óscar Balmaseda
<antonio.o.balmas...@gmail.com> wrote:
> Hi, everyone,
>
> I have a strange problem. I'm writing a new metric for ganglia, in python,
> in order to measure some data of the apache log. I'm pretty sure that the
> code is correct but the thing is that it's absolutely impossible open any
> file.
>
> When I try do it, the system returns:
>
> Traceback (most recent call last):
>   File "/usr/lib/ganglia/python_modules/test.py", line 41, in
> Apache_Response
>     fileHand = open('/var/log/apache2/access.log','r')
> IOError: [Errno 13] Permission denied: '/var/log/apache2/access.log'
>
> I've checked the permissions, tested with other files in other directories
> and done everything that I could think. Anyone has a clue?
>
> Thanks a lot. Regards,
> Antonio.
>
> ------------------------------------------------------------------------------
> What happens now with your Lotus Notes apps - do you make another costly
> upgrade, or settle for being marooned without product support? Time to move
> off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
> use, and manage than apps on traditional platforms. Sign up for the Lotus
> Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
> _______________________________________________
> Ganglia-general mailing list
> Ganglia-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ganglia-general
>
>

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Ganglia-general mailing list
Ganglia-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-general

Reply via email to