Skip to content

su command in emonhub logrotate file causing issues #152

Closed
@borpin

Description

@borpin

The su command is causing issues.

With it and running logrotate without sudo this error appears

switching euid to 0 and egid to 0
error: error switching euid to 0 and egid to 0: Operation not permitted

Removing the command and logrotate complains that

error: skipping "/var/log/emonhub/emonhub.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.

Note the parent directory for emoncms and emonhub are different.

drwxr-xr-x  2 pi        root       280 Dec 17 14:52 emoncms
drwxrwxr-x  2 pi        emonhub     60 Jun  9  2020 emonhub

However, I cannot see how the /var/log/emonhub permission get set to 775!

the use of su is a kludge and should be fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions