Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    What are the permissions on the directory where the file lives? If the user has write access to it, they are able to delete the file and recreate it. Commented Jun 27, 2018 at 13:33
  • It is the home directory of myuser. So what is happening is deleting and recreating? PS: The user permissions after saving the file changed to myuser.myuser as well. Commented Jun 27, 2018 at 13:36
  • 1
    Does this answer your question? Regular user is able to modify a file owned by root Commented Nov 17, 2023 at 8:39
  • 1
    Does this answer your question? How does vim steal root owned files? Commented Nov 22, 2023 at 16:33