Inconsistent handling of vi editors .swp temp files on NAS disks

Solution Verified - Updated -

Issue

  • On creating/opening a new file on NAS NFSv4 mounted file system using vi filename.txt generates an attention message:

    E325: ATTENTION
    Found a swap file by the name ".filename.txt.swp"
              owned by: nobody   dated: Fri Jul 22 00:43:06 2022
             [cannot be opened]
    While opening file "a"
    

    After pressing ENTER on the attention message and creating a file, once we save and exit, the temporary/swap files are left behind. If the file is being edited with vi again, new temporary files are created. Each time the file is edited, the number of temporary files grows.

  • When running vi as "root", the problem is not seen.

Environment

  • Red Hat Enterprise Linux 5.6
  • NFSv4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content