Xymon Mailing List Archive search

histlog file permissions

5 messages in this thread

list Jonathan Bishop · Wed, 13 Feb 2013 19:56:04 +1100 ·
Hi.

I recently noticed I'm not able to view the history log file via the web
interface. I can see that when it was working the histlog files had
permissions of 644. For some reason they are now written with 640
permissions and xymon is unable to display them. If I manually chmod to 644
xymon can read them. Where can we configure the permissions with which
these files are written? I'm talking about the files at xymon/data/hislogs
by the way. I should also mention that xymon:xymon has ownership of these
files.

Thanks,
Jon.
list Mike Burger · Wed, 13 Feb 2013 08:11:14 -0500 (EST) ·
quoted from Jonathan Bishop
Hi.

I recently noticed I'm not able to view the history log file via the web
interface. I can see that when it was working the histlog files had
permissions of 644. For some reason they are now written with 640
permissions and xymon is unable to display them. If I manually chmod to
644
xymon can read them. Where can we configure the permissions with which
these files are written? I'm talking about the files at xymon/data/hislogs
by the way. I should also mention that xymon:xymon has ownership of these
files.

Thanks,
Jon.
You may be able to accomplish this by setting an appropriate umask in the
xymon user's profile.

Otherwise, it might be simpler to put your the user which owns your apache
install into the xymon group.
list Jeremy Laidman · Thu, 14 Feb 2013 13:15:43 +1100 ·
The debian init script that comes with the Xymon source code explicitly
defines a umask of 022.  However, on my system (SLES), there's no such
definition, and so the system default must have applied, probably from my
/etc/profile.  You might have an /etc/profile that sets the umask more
restrictive that this.  As Jon said, adjusting the xymon user's profile is
one way to fix this.
quoted from Jonathan Bishop

On 13 February 2013 19:56, Jonathan Bishop <user-c5231dd0a8e2@xymon.invalid> wrote:
Hi.

I recently noticed I'm not able to view the history log file via the web
interface. I can see that when it was working the histlog files had
permissions of 644. For some reason they are now written with 640
permissions and xymon is unable to display them. If I manually chmod to 644
xymon can read them. Where can we configure the permissions with which
these files are written? I'm talking about the files at xymon/data/hislogs
by the way. I should also mention that xymon:xymon has ownership of these
files.

Thanks,
Jon.

list François Maillard · Thu, 14 Feb 2013 09:37:16 +0100 ·
Hi.

I'm running Xymon 4.2.3 and had the same issue. After spending quite some time on troubleshooting and making sure that when xymon started, it was having an effective umask of 022 , but that after some time hobbitd_history was setting the wrong perms (I know that makes little sense, still that's what happened), I finally patched the CGI so that they chmod the files.
I attached the patch and the script I wrote to fix the perms. You obviously need to add rights for the www user to run the fix_history script via sudo. You may have to change the paths as well...

Of course, I'm interested if anyone's got a fix for the root cause.

Francois
quoted from Mike Burger


-----Message d'origine-----
De : xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] De la part de Mike Burger
Envoyé : mercredi 13 février 2013 14:11
À : Jonathan Bishop
Cc : xymon at xymon.com
Objet : Re: [Xymon] histlog file permissions
Hi.

I recently noticed I'm not able to view the history log file via the 
web interface. I can see that when it was working the histlog files 
had permissions of 644. For some reason they are now written with 640 
permissions and xymon is unable to display them. If I manually chmod 
to
644
xymon can read them. Where can we configure the permissions with which 
these files are written? I'm talking about the files at 
xymon/data/hislogs by the way. I should also mention that xymon:xymon 
has ownership of these files.

Thanks,
Jon.
You may be able to accomplish this by setting an appropriate umask in the xymon user's profile.

Otherwise, it might be simpler to put your the user which owns your apache install into the xymon group.


Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
France Telecom - Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, France Telecom - Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
Attachments (2)
list Henrik Størner · Thu, 14 Feb 2013 14:09:43 +0100 ·
On Wed, 13 Feb 2013 19:56:04 +1100, Jonathan Bishop <user-c5231dd0a8e2@xymon.invalid>
quoted from François Maillard
wrote:
Hi.

I recently noticed I'm not able to view the history log file via the web
interface. I can see that when it was working the histlog files had
permissions of 644. For some reason they are now written with 640
permissions and xymon is unable to display them. If I manually chmod to
644
xymon can read them. Where can we configure the permissions with which
these files are written? I'm talking about the files at
xymon/data/hislogs
by the way. I should also mention that xymon:xymon has ownership of
these
files.
Weird, there's nothing in Xymon that touches these files once they have
been created.

If you run "stat FILENAME" it will show you the time the permissions were
changed in the "Change:" line. E.g.

$ stat bla
  File: `bla'
  Size: 1               Blocks: 8          IO Block: 4096   regular file
Device: 6801h/26625d    Inode: 2851019     Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/hstoerne)   Gid: ( 1000/hstoerne)
Access: 2013-02-14 14:06:56.000000000 +0100
Modify: 2013-02-14 14:07:10.000000000 +0100
Change: 2013-02-14 14:07:10.000000000 +0100

$ chmod 400 bla

$ stat bla
  File: `bla'
  Size: 1               Blocks: 8          IO Block: 4096   regular file
Device: 6801h/26625d    Inode: 2851019     Links: 1
Access: (0400/-r--------)  Uid: ( 1000/hstoerne)   Gid: ( 1000/hstoerne)
Access: 2013-02-14 14:06:56.000000000 +0100
Modify: 2013-02-14 14:07:10.000000000 +0100
Change: 2013-02-14 14:07:26.000000000 +0100

Note that "Change:" is different from "Modify:" - it shows when the chmod
happened.

Perhaps that could give you a clue ?


Regards,
Henrik