Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

When deleting a file in Linux, there is an Operation not permitted prompt about how to solve it.

2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

What if an Operation not permitted prompt appears when deleting a file in Linux? I believe that many inexperienced people are at a loss about this, so this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

1. If an ordinary user has sufficient permissions, the general folder may be disabled by another service / process.

Lsof + D / Dir/Your/Want/To/Delete/

First execute the above command, query the process calling the folder IDs, and then kill, this time should be able to delete!

two。 If an ordinary user lacks permission, delete the folder with the help of su or sudo command

3. If a root user still reports the above error, the file is likely to be locked

[root@linux] # lsattr YourFile-I-YourFile

You need to use the lsattr command to see if the system has added I attributes, such as above. This parameter allows a file to "cannot be deleted, renamed, set links, write or add data!" It is of great help to the system security! This command is also the reason why you still cannot perform the delete operation since you are a root user. Then use the chattr command to remove the attribute

[root@linux] # chattr-I YourFile [root@linux] # lsattr YourFile [root@linux] # what is a Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.

After reading the above, do you know how to solve the problem when there is an Operation not permitted prompt when deleting a file in Linux? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report