WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

enabled Log rotation unable to read access.log and error.log

  • 1.  enabled Log rotation unable to read access.log and error.log

    Posted Wed April 24, 2013 02:49 AM

    I have enabled log rotation to IBM HTTP Server on daily basis. And I have changed log locations to /ihslogs files system. useually I stop/start http server using
    sudo /usr/IBM/HTTPServer/bin/apachectl stop
    sudo /usr/IBM/HTTPServer/bin/apachectl start


    After enable the log rotation I am unable to read access.log and error.log IHS logs owning root access and ihs logs generated with 600 permissions instead of 644 permissions. How can I change the permissions to 644. I asked unix team to change the permissions to 644. They simply changed permissions to 644 using chmod -R 644 ihslogs. After changed the permissions next day IHS generated new logs with 600 permission. How can we resolve this issue.


    user and group of this http server is nobody , port no is 80, and AIX 6.1 env.


    Is it IHS issue or Unix issue.

    Could you please help me on this

     



  • 2.  enabled Log rotation unable to read access.log and error.log

    Posted Wed May 15, 2013 10:53 AM
    So... try to adjust UMASK in user profile.

    en.wikipedia.org/wiki/Umask

    i hope it helps.
    Leonardo Monteiro


  • 3.  enabled Log rotation unable to read access.log and error.log

    Posted Sat May 18, 2013 05:20 AM
    Hi ljmont,

    Thank you for the reply.



    I've enabled log rotation to application server's (time based) in the same server with same umask logs generated with 644 permission.

    -rw-r--r--    1 wasadmin wasadmin        167 May 17 00:00 SystemErr_13.05.18_00.00.00.log
    -rw-r--r--    1 wasadmin wasadmin      51237 May 17 23:57 SystemOut_13.05.18_00.00.00.log
    -rw-r--r--    1 wasadmin wasadmin        167 May 18 00:00 SystemErr.log
    -rw-r--r--    1 wasadmin wasadmin       8148 May 18 03:02 SystemOut.log

    Here I have enabled application server logs using "wasadmin"

    After log-in to server with my I've switch into to wasadmin that is sudo su - wasadmin


    But IHS logs generated with 600 permissions.

    -rw-------    1 root     system        73601 May 05 16:59 access_log.2013_05_05_00_00_00
    -rw-------    1 root     system       729787 May 11 07:33 error_log.2013_05_11_00_00_00
    -rw-------    1 root     system       241049 May 11 07:33 access_log.2013_05_11_00_00_00
    -rw-------    1 root     system      2826849 May 12 17:02 error_log.2013_05_12_00_00_00
    -rw-------    1 root     system       739304 May 12 17:02 access_log.2013_05_12_00_00_00


    Useually I've stopped/started IBM HTTP Server using sudo commands

    sudo /usr/IBM/HTTPServer/bin/apachectl stop
    sudo /usr/IBM/HTTPServer/bin/apachectl start

    my sudo commands in sudoers list given below:

    sudo -l

    (ALL) NOPASSWD: /usr/IBM/HTTPServer/bin/apachectl start, /usr/IBM/HTTPServer/bin/apachectl stop, /usr/IBM/HTTPServer/bin/apachectl restart,
        /usr/IBM/HTTPServer/binapachectl graceful
     
    (ALL) NOPASSWD: /usr/bin/su - wasadmin
        (ALL) NOPASSWD: /usr/bin/cp


    UMASK value is 027

    If I changed umask V,alue IHS will generate log 644 permissions, So which umask value do I need to set?


    Thank you,

    Regards,

    Brahma