permission error on /var/log/messages
Hi
I cannot make any permission change on /var/log/messages.Currently the permission looks like ?r---ws--t 58243 115 59053 1358438049 Jan 10 10:55 /var/log/messages How can i change the permission to root. Already chown failed giving a permission failed error. |
Hello,
Looks like you have the 'sticky bit' set on your messages file. That means that only the owner and users with write permissions can modify that file. What also strikes me as strange is that you have numerical IDs instead of the regular username:group combination. Did you by any change get the permissions with ls -ln. Try ls -l to see the username of the owner. Try as root to remove the sticky bit with: Code:
chmod -t /var/log/messages Eric |
Hi
Output for ls -ln ?r---ws--t 58243 115 59053 1358438049 Jan 10 10:55 messages Output for ls -l ?r---ws--t 58243 115 59053 1358438049 Jan 10 10:55 messages Output for chmod -t /var/log/messages chmod: changing permissions of `/var/log/messages': Operation not permitted No idea why this happens Waiting for a help |
Hi,
As what user did you try the chmod command? Can you execute the following and post the output: Code:
stat /var/log/messages Eric |
Hi
as root Output for stat /var/log/messages File: `/var/log/messages' Size: 1358438049 Blocks: 4022424563 IO Block: 4096 weird file Device: 803h/2051d Inode: 6968287 Links: 58243 Access: (3431/?r---ws--t) Uid: ( 115/ UNKNOWN) Gid: (59053/ UNKNOWN) Access: 2011-01-10 10:55:39.000000000 +0530 Modify: 2011-01-10 10:55:39.000000000 +0530 Change: 2011-01-10 10:55:39.000000000 +0530 |
Hi,
Something is terribly wrong with your system in my opinion. Stat only shows the numerical ID. Can you execute the following as root: Code:
id Code:
cat /etc/passwd | grep 115 Kind regards, Eric |
Hi
Output for id uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) No result for cat /etc/passwd | grep 115 cat /etc/group | grep 59053 |
Hello,
What are the permissions on your /var/log folder: Code:
ls -l /var | grep log Eric |
Quote:
Code:
#chattr -i /var/log/messages |
Quote:
You might have a good point here. Didn't think of that one yet (Monday, Monday, ...). List the attributes using : Code:
lsattr /var/log/messages Eric |
Hi
Please have a look Quote:
|
Quote:
It should be, Code:
# chown root:root /var/log/messages Code:
chown root.root messages |
Hello,
Try: Code:
chattr -ais /var/log/messages Kind regards, Eric |
Hi
Output Quote:
|
Quote:
Code:
#chattr -i /var/log/messeages Code:
#echo $? |
All times are GMT -5. The time now is 09:24 PM. |