°Ô½Ã¹° 1,369°Ç
   
logrotate err - because parent directory has insecure permissions
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2019-02-13 (¼ö) 12:00 Á¶È¸ : 5837
±ÛÁÖ¼Ò :
                                
·Î±× ·ÎÅ×ÀÌÆ®°¡ Á¦´ë·Î ÀÛµ¿¾ÈµÇ°í ÀÖÀ½ 

# ls -l syslog*
-rw-r-----   1 syslog    adm              521289745 Feb 13 11:51 syslog
-rw-r-----   1 syslog    adm              139767272 Jan 22 11:50 syslog.1
-rw-r-----   1 syslog    adm             3844697362 Jan 16 09:21 syslog.2.gz
-rw-r-----   1 syslog    adm               79583687 Dec  5 06:25 syslog.3.gz
-rw-r-----   1 syslog    adm               77608752 Dec  4 06:25 syslog.4.gz
-rw-r-----   1 syslog    adm               74058606 Dec  3 06:25 syslog.5.gz
-rw-r-----   1 syslog    adm               71636883 Dec  2 06:25 syslog.6.gz
-rw-r-----   1 syslog    adm               72745054 Dec  1 06:25 syslog.7.gz


-d, --debug               Don't do anything, just test (implies -v) 
-f, --force               Force file rotation


# logrotate -d -f /etc/logrotate.d/rsyslog
...................................
rotating pattern: /var/log/syslog
 forced from command line (7 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/syslog
error: skipping "/var/log/syslog" 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.
...................................


:: À¯Àú±ÇÇÑ ºÎ¿© 
# vim /etc/logrotate.d/rsyslog 
/var/log/syslog
{
        rotate 6
        daily
        missingok
        notifempty
        delaycompress
        compress
        su root root   ###  Ãß°¡
        postrotate
                /usr/lib/rsyslog/rsyslog-rotate
        endscript
}


# logrotate -f /etc/logrotate.d/rsyslog
-rw-r-----   1 syslog    adm                    574 Feb 13 11:53 syslog
-rw-r-----   1 syslog    adm              521326375 Feb 13 11:53 syslog.1
-rw-r-----   1 syslog    adm               23230928 Jan 22 11:50 syslog.2.gz
-rw-r-----   1 syslog    adm             3844697362 Jan 16 09:21 syslog.3.gz
-rw-r-----   1 syslog    adm               79583687 Dec  5 06:25 syslog.4.gz
-rw-r-----   1 syslog    adm               77608752 Dec  4 06:25 syslog.5.gz
-rw-r-----   1 syslog    adm               74058606 Dec  3 06:25 syslog.6.gz
-rw-r-----   1 syslog    adm               71636883 Dec  2 06:25 syslog.7.gz


À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.