Reason: Files with the i attribute cannot be modified.
- First, when executing chmod 777 /etc/sysctl.conf, an error will be thrown: chmod: changing permissions of '/etc/sysctl.conf': Operation not permitted.
2. Then, execute the command lsattr /etc/sysctl.conff to see the current file's attributes.
3. It can be observed that the current file has the i attribute. By referring to the command's help documentation, it can be seen that files with the i attribute cannot be modified or even deleted, even by the root user.
4. Therefore, the corresponding solution is to remove the i attribute from the file. Remove the i attribute: chattr -i /etc/sysctl.conf.
5. Then, the content of this file can be modified. At this point, the file can be deleted and written to using rm.