Bug 811116 - error: skipping "/var/log/rhn/rhn_web_api.log" because parent directory has insecure permissions...
Summary: error: skipping "/var/log/rhn/rhn_web_api.log" because parent directory has i...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.8
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Marcelo Moreira de Mello
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space18
TreeView+ depends on / blocked
 
Reported: 2012-04-10 07:47 UTC by Jan Hutař
Modified: 2012-11-01 16:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-01 16:18:58 UTC
Embargoed:


Attachments (Terms of Use)

Description Jan Hutař 2012-04-10 07:47:06 UTC
Description of problem:
When rotating Spacewalk's logs on Fedora 16, I got error message which is not present on RHEL5/RHEL6/Fedora15 variant or in Satellite 5.4.1.


Version-Release number of selected component (if applicable):
spacewalk-backend-1.8.12-1.fc16.noarch
tomcat6-6.0.32-17.fc16.noarch
logrotate-3.8.0-3.fc16.x86_64


How reproducible:
aways


Steps to Reproduce:
1. # cat /tmp/tmp.GFVcc6QD4P
rotate 40
size=1k
create
missingok
include /etc/logrotate.d
2. # logrotate -f /tmp/tmp.GFVcc6QD4P


Actual results:
error: skipping "/var/log/rhn/rhn_web_api.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.
error: skipping "/var/log/tomcat6/catalina.out" 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.


Expected results:
Should work and no error message should be printed


Additional info:
This is probably F16 logrotate feature so might not be important for F15/RHEL5/RHEL6 builds (simmilar bugs e.g. bug 751581 or bug 755491).

Comment 1 Marcelo Moreira de Mello 2012-05-25 20:24:07 UTC
  Taking....


  Issue reproduced on F16 + spacewalk 1.8 nightly build. 

  rhn_web_api seems to be fixed on newer Spacewalk version.

# logrotate  -f /tmp/test.logrotate 
error: skipping "/var/log/tomcat6/catalina.out" 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.

# ls -la /var/log/tomcat6/catalina.out 
-rw-rw-r--. 1 tomcat tomcat 1785 May 25 17:17 /var/log/tomcat6/catalina.out

# ls -lad /var/log/tomcat6
drwxrwxr-x. 2 root tomcat 4096 May 25 17:17 /var/log/tomcat6

# ls -la /var/log/rhn/rhn_web_api.log 
-rw-r--r--. 1 tomcat tomcat 292 May 25 17:19 /var/log/rhn/rhn_web_api.log

Packages:
-----------
spacewalk-backend-1.8.28-1.fc16.noarch
tomcat6-6.0.32-17.fc16.noarch
logrotate-3.8.0-3.fc16.x86_64

Comment 2 Marcelo Moreira de Mello 2012-05-25 20:34:04 UTC
  Hello, 

    It seems that the issue already were reported as showed below on automatic tests. 

# 748913 - logrotate issue (Waiting fix on Tomcat6) 
# 790334 - tomcat-7.0.logrotate should specify "su root tomcat" (addressed on Tomcat7) 

    Examing the /etc/logrotate.d/tomcat6 we have:

[root@dhcp83 logrotate.d]# rpm -qf /etc/logrotate.d/tomcat6 
tomcat6-6.0.32-17.fc16.noarch
[root@dhcp83 logrotate.d]# cat /etc/logrotate.d/tomcat6
/var/log/tomcat6/catalina.out {
    copytruncate
    weekly
    rotate 52
    compress
    missingok
    create 0644 tomcat tomcat
}

[root@dhcp83 logrotate.d]# logrotate -f /etc/logrotate.d/tomcat6
error: skipping "/var/log/tomcat6/catalina.out" 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.


 Since the rhn_web_api.log seems to be fixed, and the other issue is related with tomcat6, I think we can close this case as WORKSFORME.

 I'm double checking with spacewalk-devel team before close it. 

Thank you. 

Best Regards,
mmello

Comment 3 Marcelo Moreira de Mello 2012-05-25 20:44:36 UTC
  Hello, 

     Since the issue related with /var/log/rhn/rhn_web_api.log is fixed, the issue related with Tomcat is being tracked by bz#748913 (https://bugzilla.redhat.com/show_bug.cgi?id=748913). 


      Flagging this to MODIFIED. 

  Best Regards,
mmello

Comment 4 Jan Pazdziora 2012-10-30 19:23:42 UTC
Moving ON_QA. Packages that address this bugzilla should now be available in yum repos at http://yum.spacewalkproject.org/nightly/

Comment 5 Jan Pazdziora 2012-11-01 16:18:58 UTC
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18


Note You need to log in before you can comment on or make changes to this bug.