Git Product home page Git Product logo

Comments (7)

Nico640 avatar Nico640 commented on July 17, 2024

I was able to reproduce the issue, however, this only seems to happen on armhf.
It could be that travis's hosts have an umask of 0002, which will cause a file permission of 664.
I will add an manual chmod 644 in the dockerfile.

As already described in the old issue, executing "chmod 644 /etc/logrotate.d/unms" inside the container should fix this.

from docker-unms.

patricegautier avatar patricegautier commented on July 17, 2024

Applied.

Thanks much for the response, and for picking up this project!

from docker-unms.

Nico640 avatar Nico640 commented on July 17, 2024

No problem :)

Should be fixed in the latest build

from docker-unms.

Trunkzeh avatar Trunkzeh commented on July 17, 2024

@Nico640 Was this fix implemented? My unms.log had reached over 11GB the other day. I've deleted it; restarted unms and it re-created a fresh unms.log file; this morning its over 60MB which isnt a big deal however it doesnt appear logrotate is functioning correctly - the logrotate file stipulates the log file to be no bigger than 10MB. Same issue with ucrm.log as well.

To confirm; the unms logrotate file reports its permission as 0644.

from docker-unms.

Nico640 avatar Nico640 commented on July 17, 2024

@Trunkzeh Yes it was. The fix just sets the file permission of /etc/logrotate.d/unms and ucrm to 644.
As far as I can see, my logrotate on x86 is working fine.

The cron job for logrotate should run daily, so the files can get bigger than 10MB until logrotate executes.
Try executing "/usr/sbin/logrotate -v /etc/logrotate.conf" on the container and check the output / the log files and see if they get rotated.

from docker-unms.

Trunkzeh avatar Trunkzeh commented on July 17, 2024

@Nico640 Found the problem:

rotating pattern: /config/unms/logs/*.log  10485760 bytes (7 rotations)
empty log files are rotated, old logs are removed
considering log /config/unms/logs/ucrm.log
error: skipping "/config/unms/logs/ucrm.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
considering log /config/unms/logs/unms.log
error: skipping "/config/unms/logs/unms.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.

Fixed it by doing the following:

  1. Setting chmod 755 logs/ && chown root:root logs/
  2. Added su root root to /etc/logrotate.conf
  3. Running /usr/sbin/logrotate -v /etc/logrotate.conf rotated the logs correctly.

from docker-unms.

Nico640 avatar Nico640 commented on July 17, 2024

@Trunkzeh I'm glad you got it fixed! I wonder what happened that it didn't work anymore.

from docker-unms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.