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

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

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest