Cannot remove or edit file (even as root) [solved]
While trying to remove the now defunct skype repo from Debian12 I ran into a slight snag, both nano and rm failed to be able to edit the file.
# rm skype-stable.list
rm: cannot remove 'skype-stable.list': Operation not permitted
It turns out that running lsattr showed the immutable attribute (i).
# lsattr skype-stable.list
----i---------e------- skype-stable.list
A quick update to this allowed the file to be removed without issue.
# chattr -i -a skype-stable.list
# lsattr skype-stable.list
--------------e------- skype-stable.list
# rm skype-stable.list
File deleted!
Comments
Post a Comment