Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Error in setting owner of /var/log/portage/elog/summary.log
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 688
Location: USA

PostPosted: Sun Jul 24, 2011 6:33 pm    Post subject: Error in setting owner of /var/log/portage/elog/summary.log Reply with quote

Cron sends me this error message:
Code:
error: error setting owner of /var/log/portage/elog/summary.log-20110717.gz: Operation not permitted

How do I fix this?
Back to top
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1330
Location: Netherlands

PostPosted: Mon Jul 25, 2011 11:17 pm    Post subject: Re: Error in setting owner of /var/log/portage/elog/summary. Reply with quote

cfgauss wrote:
Cron sends me this error message:
Code:
error: error setting owner of /var/log/portage/elog/summary.log-20110717.gz: Operation not permitted

How do I fix this?
By putting this line
Code:
su portage portage
in your /etc/logrotate.d/elog-save-summary ...

HTH ;-)
swimmer
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 688
Location: USA

PostPosted: Tue Jul 26, 2011 7:43 am    Post subject: Re: Error in setting owner of /var/log/portage/elog/summary. Reply with quote

swimmer wrote:
cfgauss wrote:
Cron sends me this error message:
Code:
error: error setting owner of /var/log/portage/elog/summary.log-20110717.gz: Operation not permitted

How do I fix this?
By putting this line
Code:
su portage portage
in your /etc/logrotate.d/elog-save-summary ...

Code:
$ cat /etc/logrotate.d/elog-save-summary
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Rotate the log created by the save_summary elog module.

/var/log/portage/elog/summary.log {
    su portage portage
    missingok
    nocreate
    delaycompress
}

It seems to have it. Is there something else wrong?
Back to top
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1330
Location: Netherlands

PostPosted: Tue Jul 26, 2011 7:49 am    Post subject: Re: Error in setting owner of /var/log/portage/elog/summary. Reply with quote

cfgauss wrote:
Code:
$ cat /etc/logrotate.d/elog-save-summary
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Rotate the log created by the save_summary elog module.

/var/log/portage/elog/summary.log {
    su portage portage
    missingok
    nocreate
    delaycompress
}

It seems to have it. Is there something else wrong?
Of course you should also check the permissions for /var/log/portage{/elog/} ;-)

HTH
swimmer
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 688
Location: USA

PostPosted: Tue Jul 26, 2011 7:56 am    Post subject: Re: Error in setting owner of /var/log/portage/elog/summary. Reply with quote

swimmer wrote:
Of course you should also check the permissions for /var/log/portage{/elog/}

Code:
$ ls -ld /var/log/portage
drwxr-xr-x 3 root root 4096 Jun 10  2010 /var/log/portage
$ ls -ld /var/log/portage/elog
drwxrws--- 2 portage root 4096 Jul 24 20:00 /var/log/portage/elog

Are these correct?
Back to top
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1330
Location: Netherlands

PostPosted: Tue Jul 26, 2011 8:13 am    Post subject: Re: Error in setting owner of /var/log/portage/elog/summary. Reply with quote

cfgauss wrote:
Code:
$ ls -ld /var/log/portage
drwxr-xr-x 3 root root 4096 Jun 10  2010 /var/log/portage
$ ls -ld /var/log/portage/elog
drwxrws--- 2 portage root 4096 Jul 24 20:00 /var/log/portage/elog

Are these correct?

Looks ok AFAIK ... I'm sorry to say that I'm running out of ideas :-/

Greetz
swimmer
Back to top
View user's profile Send private message
cfgauss
l33t
l33t


Joined: 18 May 2005
Posts: 688
Location: USA

PostPosted: Tue Jul 26, 2011 8:53 am    Post subject: Re: Error in setting owner of /var/log/portage/elog/summary. Reply with quote

swimmer wrote:

Looks ok AFAIK ... I'm sorry to say that I'm running out of ideas :-/

Many thanks for your ideas, as I didn't have any. :-(
Back to top
View user's profile Send private message
Floppe
n00b
n00b


Joined: 27 Feb 2003
Posts: 50
Location: Finland

PostPosted: Thu Aug 11, 2011 5:27 am    Post subject: Re: Error in setting owner of /var/log/portage/elog/summary. Reply with quote

cfgauss wrote:
Cron sends me this error message:
Code:
error: error setting owner of /var/log/portage/elog/summary.log-20110717.gz: Operation not permitted

How do I fix this?


How about the old files in elog directory? I think, not sure, that they also need to have portage owner if you use su portage in logrotate.
Back to top
View user's profile Send private message
mimosinnet
l33t
l33t


Joined: 10 Aug 2006
Posts: 713
Location: Barcelona, Spain

PostPosted: Thu Aug 11, 2011 4:58 pm    Post subject: Re: Error in setting owner of /var/log/portage/elog/summary. Reply with quote

Floppe wrote:
How about the old files in elog directory? I think, not sure, that they also need to have portage owner if you use su portage in logrotate.


I have the owner and group of the files in /var/log/portage/elog are root:portage, and it is working.

Cheers!
Back to top
View user's profile Send private message
dogshu
Apprentice
Apprentice


Joined: 22 Jun 2003
Posts: 173
Location: New Haven, CT, USA

PostPosted: Sat Aug 13, 2011 7:39 pm    Post subject: Reply with quote

chown root:portage on /var/log/portage/elog doesn't work for me either. I'm just going to turn off portage log rotation until this problem gets fixed:
Code:
# rm -f /etc/logrotate.d/elog-save-summary
Back to top
View user's profile Send private message
Yuu
Apprentice
Apprentice


Joined: 23 Dec 2008
Posts: 223
Location: France

PostPosted: Sun Aug 14, 2011 8:12 am    Post subject: Reply with quote

Same here, that's quite weird :
Quote:
# ls -ld /var/log/portage
drwxr-xr-x 3 root root 4096 1 mai 2008 /var/log/portage
# ls -ld /var/log/portage/elog/
drwxrws--- 2 portage portage 4096 14 août 01:00 /var/log/portage/elog/
# ll -lh /var/log/portage/elog/
total 28K
drwxrws--- 2 portage portage 4,0K 14 août 01:00 .
drwxr-xr-x 3 root root 4,0K 1 mai 2008 ..
-rw------- 1 portage portage 0 10 août 01:00 logrotate_temp.8xHbGO
-rw------- 1 portage portage 0 14 août 01:00 logrotate_temp.NqmA5F
-rw-rw-r-- 1 root portage 2,3K 9 août 04:06 summary.log
-rw-rw-r-- 1 root portage 628 28 juil. 04:08 summary.log.1
-rw-rw-r-- 1 root portage 580 24 juil. 22:59 summary.log.2.gz
-rw-rw-r-- 1 root portage 322 17 juil. 17:01 summary.log.3.gz
-rw-rw-r-- 1 root portage 620 7 juil. 10:34 summary.log.4.gz
# cat /etc/logrotate.d/elog-save-summary
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Rotate the log created by the save_summary elog module.

/var/log/portage/elog/summary.log {
su portage portage
missingok
nocreate
delaycompress
}


Now, we check with portage :
Quote:
# su -s/bin/bash portage
su : Le service d'authentification n'a pas pu récupérer les informations d'authentification
(Ignoré)
bash: cd: /var/tmp/portage: Aucun fichier ou dossier de ce type
$ ll
total 12K
drwxr-xr-x 3 root root 4,0K 1 mai 2008 .
drwx--x--x 15 root root 4,0K 14 août 01:00 ..
drwxrws--- 2 portage portage 4,0K 14 août 01:00 elog
$ cd elog/
$ ll
total 28K
drwxrws--- 2 portage portage 4,0K 14 août 01:00 .
drwxr-xr-x 3 root root 4,0K 1 mai 2008 ..
-rw------- 1 portage portage 0 10 août 01:00 logrotate_temp.8xHbGO
-rw------- 1 portage portage 0 14 août 01:00 logrotate_temp.NqmA5F
-rw-rw-r-- 1 root portage 2,3K 9 août 04:06 summary.log
-rw-rw-r-- 1 root portage 628 28 juil. 04:08 summary.log.1
-rw-rw-r-- 1 root portage 580 24 juil. 22:59 summary.log.2.gz
-rw-rw-r-- 1 root portage 322 17 juil. 17:01 summary.log.3.gz
-rw-rw-r-- 1 root portage 620 7 juil. 10:34 summary.log.4.gz
$ tar czf summary.log.tar.gz summary.log
$ ll
total 32K
drwxrws--- 2 portage portage 4,0K 14 août 10:30 .
drwxr-xr-x 3 root root 4,0K 1 mai 2008 ..
-rw------- 1 portage portage 0 10 août 01:00 logrotate_temp.8xHbGO
-rw------- 1 portage portage 0 14 août 01:00 logrotate_temp.NqmA5F
-rw-rw-r-- 1 root portage 2,3K 9 août 04:06 summary.log
-rw-rw-r-- 1 root portage 628 28 juil. 04:08 summary.log.1
-rw-rw-r-- 1 root portage 580 24 juil. 22:59 summary.log.2.gz
-rw-rw-r-- 1 root portage 322 17 juil. 17:01 summary.log.3.gz
-rw-rw-r-- 1 root portage 620 7 juil. 10:34 summary.log.4.gz
-rw-r--r-- 1 portage portage 1,2K 14 août 10:30 summary.log.tar.gz


Hmm, creating an archive with portage user has worked; but it still doesn't work when logrotate does it.
_________________
Main laptop : T8300 cpu | 200 GB hard drive | 2 GB of ram | 8600M GT | Gentoo x86_64
Server : Celeron 220 cpu | 250 GB hard drive | 2 GB of ram | SiS 662 VGA | Gentoo x86_64
Back to top
View user's profile Send private message
pkturner
n00b
n00b


Joined: 19 Sep 2003
Posts: 35
Location: Massachusetts, USA

PostPosted: Sun Sep 04, 2011 10:56 am    Post subject: Reply with quote

FWIW, here's what I did. Changed permissions in /var/log/portage/elog
Quote:
elog # ls -l
total 20
-rw-rw-r-- 1 portage portage 1420 Sep 1 06:43 summary.log
-rw-rw-r-- 1 root portage 548 Jul 27 04:11 summary.log-20110803.gz
-rw-rw-r-- 1 root portage 3409 Aug 7 08:08 summary.log-20110814.gz
-rw-rw-r-- 1 root portage 3189 Aug 20 08:00 summary.log-20110821.gz
-rw-rw-r-- 1 root portage 2298 Aug 27 06:37 summary.log-20110828
elog # chown portage summary.log-20110803.gz summary.log-20110814.gz summary.log-20110821.gz summary.log-20110828
elog # ls -l
total 20
-rw-rw-r-- 1 portage portage 1420 Sep 1 06:43 summary.log
-rw-rw-r-- 1 portage portage 548 Jul 27 04:11 summary.log-20110803.gz
-rw-rw-r-- 1 portage portage 3409 Aug 7 08:08 summary.log-20110814.gz
-rw-rw-r-- 1 portage portage 3189 Aug 20 08:00 summary.log-20110821.gz
-rw-rw-r-- 1 portage portage 2298 Aug 27 06:37 summary.log-20110828

Tested the change.
Quote:
elog # logrotate -v -f /etc/logrotate.conf

And the error went away.
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2284
Location: Adendorf, Germany

PostPosted: Tue Sep 06, 2011 8:25 am    Post subject: Reply with quote

No, it is not this weird. The said line "su portage portage" has been changed to this quite recently.
Yuu wrote:
Code:
# ll -lh /var/log/portage/elog/
total 28K
drwxrws--- 2 portage portage 4,0K 14 août  01:00 .
drwxr-xr-x 3 root    root    4,0K  1 mai    2008 ..
-rw------- 1 portage portage    0 10 août  01:00 logrotate_temp.8xHbGO
-rw------- 1 portage portage    0 14 août  01:00 logrotate_temp.NqmA5F
-rw-rw-r-- 1 root    portage 2,3K  9 août  04:06 summary.log
-rw-rw-r-- 1 root    portage  628 28 juil. 04:08 summary.log.1
-rw-rw-r-- 1 root    portage  580 24 juil. 22:59 summary.log.2.gz
-rw-rw-r-- 1 root    portage  322 17 juil. 17:01 summary.log.3.gz
-rw-rw-r-- 1 root    portage  620  7 juil. 10:34 summary.log.4.gz
It looked the same on my system, and there is the problem. logrotate becomes user "portage" and therefore can not move files owned by root. The old logs have to be chown'ed to portage and all should be well.
_________________
Important German:
  1. "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
  2. "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
Back to top
View user's profile Send private message
Yuu
Apprentice
Apprentice


Joined: 23 Dec 2008
Posts: 223
Location: France

PostPosted: Tue Sep 06, 2011 1:34 pm    Post subject: Reply with quote

Yeah, you're right. Last week, I did a chown portage:portage /var/log/portage/elog/* (to correct old files) and it seems to work fine : no more mails from cron :]

Code:
#ls -lh /var/log/portage/elog/
total 28K
-rw-rw-r-- 1 portage root    3.6K Sep  4 11:51 summary.log
-rw-rw-r-- 1 portage root    8.2K Aug 28 13:50 summary.log.1
-rw-rw-r-- 1 portage portage  346 Jul 28 04:08 summary.log.2.gz
-rw-rw-r-- 1 portage portage  580 Jul 24 22:59 summary.log.3.gz
-rw-rw-r-- 1 portage portage  322 Jul 17 17:01 summary.log.4.gz

_________________
Main laptop : T8300 cpu | 200 GB hard drive | 2 GB of ram | 8600M GT | Gentoo x86_64
Server : Celeron 220 cpu | 250 GB hard drive | 2 GB of ram | SiS 662 VGA | Gentoo x86_64
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum