Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save linuxkathirvel/53d5a1faa7b0369101ec51cc8725e212 to your computer and use it in GitHub Desktop.
Save linuxkathirvel/53d5a1faa7b0369101ec51cc8725e212 to your computer and use it in GitHub Desktop.
error: skipping "/var/mail/kathirvel" 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.

error: skipping "/var/mail/kathirvel" 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.

Solution

For example: if you are going to configure the logrotate to /var/mail/kathirvel file, it will have the permissions like owner=kathirvel, group=mail. We should mention 'su username groupname' to non-root user's file. The configuration will be like below

/var/mail/kathirvel
{
        rotate 3
        su kathirvel mail
        maxsize 1M
        missingok
        notifempty
        compress
        delaycompress
        sharedscripts
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment