Wrong rotate permission

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Wrong rotate permission
# 1  
Old 11-18-2010
Wrong rotate permission

Hali All,

I have a big problem. (REDHAT) I have a logrotate definition for wtmp:

/var/log/wtmp {
monthly
minsize 1M
create 0644 root utmp
rotate 9
}

There is a line for create the file with 0644 permission. If I run the definition manually it works as well, but when it should be run automatically the permission rollback to the 0664.

I dont know how does it happen Smilie
# 2  
Old 11-22-2010
Any IDEA? Smilie
# 3  
Old 12-08-2010
Here is the cause REDHAT: [root@ etc]# cat /etc/rc.d/rc.sysinit | grep wtmp [ -f /var/run/utmpx -o -f /var/log/wtmpx ] && _NEED_XFILES=1 # Clean up utmp/wtmp touch /var/log/wtmp chgrp utmp /var/run/utmp /var/log/wtmp chmod 0664 /var/run/utmp /var/log/wtmp touch /var/log/wtmpx chgrp utmp /var/run/utmpx /var/log/wtmpx chmod 0664 /var/run/utmpx /var/log/wtmpx I'm looking for SLES servers too Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

What is wrong with file permission?

Friends, I have weird problem with my Linux OS. I have few files which is owned by root but could not be modified (edit, chmod, chown etc) # id uid=0(root) gid=0(root) groups=0(root) # whoami root # ls -l /etc/security/access-sshd.conf -rw-r--r-- 1 root root 431 Jun 22 03:31... (12 Replies)
Discussion started by: baluchen
12 Replies

2. UNIX for Dummies Questions & Answers

Logs do not rotate

My problem: Both access and error logs do not rotate any more and get really large. They are located here: /srv/www/+vHost name here+/logs/ Configuration seems to be here: /etc/logrotate.conf => looks OK, including "size 10M" to avoid large files (/etc/logrotate.d => is empty) manually... (4 Replies)
Discussion started by: floko
4 Replies

3. Shell Programming and Scripting

Log rotate

Hi, I have below script in logrotate.d to rotate logs. logs are not rotating after the file grow to 1k, do you have any idea? Is it because of it just only 1K? Please let me know if the below syntax is in correct. # more trotate /sourcepath/*/servers/*/logs/*log... (2 Replies)
Discussion started by: lpprasad321
2 Replies

4. HP-UX

How To Rotate A File in HP-UX?

I need to rotate a file in HP-UX of a application. I´ve tried to do a task in the cron with a script (with sed and ed commands) but it was a successfully option (the application continued writing the file :( ) LINEAS_OUT=$(wc -l < $RMISTDOUT) LINEAS_FIN=1,expr $LINEAS_OUT - 100p sed... (19 Replies)
Discussion started by: werkraft
19 Replies

5. UNIX for Dummies Questions & Answers

How to rotate the log messages?

Hi, i want to log rotate the /var/adm/messages file after reaching the specified limit and delete those logs. how do i do that. i you solaris 10 OS ,Please help me in doing the same.... (2 Replies)
Discussion started by: Rahulne25
2 Replies

6. Shell Programming and Scripting

Why result is wrong here ? whether break statement is wrong ?

Hi ! all I am just trying to check range in my datafile pls tell me why its resulting wrong admin@IEEE:~/Desktop$ cat test.txt 0 28.4 5 28.4 10 28.4 15 28.5 20 28.5 25 28.6 30 28.6 35 28.7 40 28.7 45 28.7 50 28.8 55 28.8 60 28.8 65 28.1... (2 Replies)
Discussion started by: Akshay Hegde
2 Replies

7. UNIX for Dummies Questions & Answers

Rotate logs every 1 hour

Hello All, I am learning unix and basically I want to rotate one of my application logs every 1 hour. I need to rotate that file every one hour. I looked in the forums and googled.. but couldn;t get proper information. Requesting you all to kindly guide me. Our application is running on... (4 Replies)
Discussion started by: arunpvp
4 Replies

8. Programming

Rotate an array

i have an array a={1,2,3,4,5} the output should be a= {4,5,1,2,3} please help me writin this program in c. (10 Replies)
Discussion started by: pgmfourms
10 Replies

9. UNIX for Advanced & Expert Users

log rotate

hi , what is the meaning of log rotate? how do i rotate /var/adm/wtmps log and gzip it? (6 Replies)
Discussion started by: cromohawk
6 Replies

10. Shell Programming and Scripting

how to rotate log files

hi friends i need a shell script to rotate the logs in a directory, dated n days back. can anybody of help. appreciate.. (0 Replies)
Discussion started by: satya_skm
0 Replies
Login or Register to Ask a Question