Unable to change the file attribute

Posted by tuxican, 09-14-2007, 12:09 PM
Hi all, I am not able to change the attribute of a file using the command chattr. Please see the output below. root@server [~]# lsattr /etc/exim.conf ----ia------- /etc/exim.conf root@server [~]# chattr -ai /etc/exim.conf root@server [~]# lsattr /etc/exim.conf ----ia------- /etc/exim.conf In fact, I can change the attributes for all the other files. I noticed that attribute of /etc is I root@server [~]# lsattr -d /etc ----------I-- /etc Any suggestions? Regards Tuxican

Posted by peete, 09-15-2007, 03:54 PM
I wasn't aware of an l (was that a lower case L (as oppose to upper case i) ?) flag for ext2 attributes. What's your distro, and are you using anything like LIDS or grsec? I have a feeling they implement their own flags (in which case you may not be able to remove them with chattr). Or it could be that the l attribute on the directory is preventing you from modifying attributes of files inside the directory. What happens if you chattr -l /etc, then chattr -ai /etc/exim.conf Last edited by peete; 09-15-2007 at 03:55 PM. Reason: typo

Posted by david510, 09-16-2007, 03:17 AM
run these commands and see if it works. chattr -i /etc/exim.conf chattr -a /etc/exim.conf

Posted by tuxican, 09-16-2007, 03:33 AM
Its a vps server. Distro is CentOS 4.5 with 2.6.9-023stab033.9-enterprise kernel. I am not using LIDS and grsec. The attribute of /etc is uppercase i. The attribute I cannot be reset using chattr command.

Ця відповідь Вам допомогла?

 Роздрукувати цю статтю

Також прочитайте

How to automaticaly download all files in a folder via FTP?

Posted by viettechorg, 05-07-2007, 03:41 AMHello there, I am having trouble with moving my files...

Drop-down header (yahoo like?)

Posted by coume, 03-13-2010, 07:40 AMHello, I struggled to find the right title for the thread...

Can't upload via php script

Posted by JohnDoe_Cro, 06-28-2008, 01:58 PMHello all, I am having problems on my server... I...

nsv streaming

Posted by kteo, 05-08-2007, 03:50 AMhello there...i have a shoutcast server installed in my...

Load Balancing 2 Web servers and 2 MySQL Servers

Posted by YYamagishi, 03-28-2008, 04:02 AMHi, I was wondering if it is possible to cluster 2 web...