LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   [SOLVED] Root unable to chmod, chown or operate on specific file (http://www.linuxquestions.org/questions/linux-software-2/%5Bsolved%5D-root-unable-to-chmod-chown-or-operate-on-specific-file-752894/)

chochem 09-05-2009 09:00 AM

[SOLVED] Root unable to chmod, chown or operate on specific file
 
I have a CUPS related problem and as part of my problem solving efforts I followed some misguided advice and used some program or other that should prevent the system from tampering with a configuration file. The file could now not be moved, deleted, replaced, chowned or chmoded. The advice, however, did nothing to solve the problem and I turned my attention to other things.

Now, however I need to edit the file and have in the meantime forgotten what I did to 'freeze' the file and so do not know how to 'unfreeze' it.

Any suggestions as to what I might have done and how it can be undone? Obviously we're not talking chmod or chown as neither is able to touch the file while I'm logged in as root (even though it belongs to the root user) - the reply to 'chmod 777 printers.conf' is:
Code:

chmod: changing permissions of `printers.conf': Operation not permitted

colucix 09-05-2009 09:08 AM

Try the command
Code:

lsattr printers.conf
to see if some special attribute has been set. If you see something like:
Code:

----i---------- printers.conf
it means the immutable bit has been set. As superuser you can remove it by issuing:
Code:

chattr -i printers.conf
If this does not solves the issue we have to investigate on the mount options of your filesystem.

chochem 09-06-2009 02:19 AM

That was exactly what I was looking for. Thank you!


All times are GMT -5. The time now is 04:40 PM.