Join the community today
Become a Member

logrotate not rotating /usr/local/nginx/logs

Discussion in 'System Administration' started by ph3x, Oct 6, 2024.

  1. ph3x

    ph3x New Member

    3
    1
    3
    Aug 29, 2024
    Ratings:
    +2
    Local Time:
    3:00 PM
    1.27.0
    10.6
    I don´t know if that´s the right sub for this question (found nothing about that in the forum here :shrug - edit: at least here George is talking about "it" messing up mysql - https://community.centminmod.com/th...restarting-after-centos-7-4-update-fix.12863/)

    Fired up some check_mk on all of my servers and vms and there popped up an error about logrotate on the centmin mod vm:

    Oct 06 00:00:01 hostname logrotate[1128698]: error: unable to open /usr/local/nginx/logs/error.log-20240815 for compression: Read-only file system

    Quick google fu led me to logrotate succeeds when manually run as root, but fails with "Read-only file system" when run by logrotate.service which looks like the same issue.


    Is this the "one and only"/correct fix for that error?

    Cheers,
    Christian
     
  2. eva2000

    eva2000 Administrator Staff Member

    53,811
    12,159
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,711
    Local Time:
    12:00 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yes you can try ReadWritePaths and see if that works for you
     
  3. ph3x

    ph3x New Member

    3
    1
    3
    Aug 29, 2024
    Ratings:
    +2
    Local Time:
    3:00 PM
    1.27.0
    10.6
    For teh record - logrotate is working now as expected.