Why is chattr and lsattr resulting in "Operation not supported while reading flags"?

I'm getting the following error:

$ lsattr /etc/rc.local
lsattr: Operation not supported While reading flags on /etc/rc.local
$ sudo chattr +i /etc/rc.local
chattr: Operation not supported while reading flags on /etc/rc.local

1 Answer

I did not notice it at the time, but the error was occuring because the file is a symlink:

$ ls -l /etc/rc.local
lrwxrwxrwx. 1 root root 13 Feb 16 2012 /etc/rc.local -> rc.d/rc.local

Strangely, lsattr on CentOS 5 works on symlinks.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like