# [solved]Update to logrotate 3.8.0 permissions problem

## dewhite

[/code][/quote]After updating logrotate to 3.8.0 on my two gentoo boxes this week, cron has started emailing to complain:

 *Quote:*   

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

 

I did a little googling around, and added the following into my /etc/logrotate.conf

```
/var/log/portage/elog/summary.log {

su portage portage

}

```

which doesn't seem to have helped.  When I run /usr/sbin/logrotate --verbose /etc/logrotate.conf part of the output says:

 *Quote:*   

> rotating pattern: /var/log/portage/elog/summary.log  weekly (4 rotations)
> 
> empty log files are rotated, old logs are removed
> 
> considering log /var/log/portage/elog/summary.log
> ...

 

As if logrotate isn't seeing the line in the config file specifying that log should be rotated as user portage.

Thanks in advance for any thoughts, ideas, suggestions, etc?

----------

## Apheus

There is the line

```
include /etc/logrotate.d
```

in /etc/logrotate.conf. In that directory, there is already a section concerning summary.log.

In /etc/logrotate.d/elog-save-summary:

```
/var/log/portage/elog/summary.log {

    missingok

    nocreate

    delaycompress

}
```

I added the line "su portage portage" below "delaycompress", and logrotate stopped complaining.

----------

## dewhite

Good man!  Worked like a charm:

 *Quote:*   

> rotating pattern: /var/log/portage/elog/summary.log  weekly (4 rotations)
> 
> empty log files are rotated, old logs are removed
> 
> switching euid to 250 and egid to 250
> ...

 

Now that I think about it though, is it a good thing that /var/log/portage/elog/summary.log appears not to exist?

At least this will stop the complaint emails from cron...

----------

