Wrong permission advise for SSL server pem file

Issue #228 resolved
Melroy van den Berg
created an issue

Hi,

When restart the monit deamon I got the following error:

    monit[]: Starting daemon monitor: monitThe SSL server PEM file '/xxx/xxx/server.pem' must have permissions no more than ...r-- (0644).
    monit[]: /etc/monit/monitrc:137: SSL server PEM file permissions check failed 'allow'
    monit[]: failed!

Nevertheless, the permissions where exactly 644, still I got this problem. The only solution was to set the file permissions to 700.

So please, either change the advise from 644 to 700, or change the sanity check in the code.

Thanks!

Kind regards, Melroy van den Berg

Comments (4)

  1. Tildeslash repo owner

    Hi,

    thanks for report, unfortunately i'm not able to reproduce the problem ... setting permission of the PEM file to 0644 throws the following error:

    The SSL server PEM file '/home/monit/monit.pem' must have permissions no more than -rwx------ (0700); right now permissions are -rw-r--r-- (0644).
    /home/monit/.monitrc_ssl:7: SSL server PEM file permissions check failed 'set'
    

    Please upgrade monit.

  2. Tildeslash repo owner

    Yet one note ... where from was the the error message snip? It seems it was truncated, as the full error message is more verbose and includes the required permissions (see the example in our previous post).

  3. Log in to comment