Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

vi error on nfs mount; E212: Can't open file for writing

Hi all,

I've setup a umask of 0 for testing on both NFS client (Centos 5.2) and NFS server (OSX 10.5.5 server).

I can create files as one user and edit/save out as another user w/o issue when directly logged into the server via ARD.

However, when I attempt the same from an NFS mount on a client machine, even as root I get the following error using vi;

"file" E212: Can't open file for writing

Looking at the system.log file on the server, I see;

kernel[0]: add_fsevent: no name hard-link! dropping the event. (event 2 vp == 0xa5db510 (-UNKNOWN-FILE)).

This baffles me. My umask is 0 meaning files I create and attempt to edit as other users are 777, but I cannot save out edits unless I do a wq! in vi. At that point, the owner of the file changes to whomever did the vi.

This isn't just a vi issue as it happens using any editor, but I like to use vi.

Any help is greatly appreciated. Hey, beer is on me!

Mac OS X (10.5.5)

Posted on Oct 28, 2008 6:27 PM

Reply
6 replies

Oct 31, 2008 9:59 AM in response to Brian Krusic

Hi all,

Thanks for the replies 🙂

I've narrowed it down to a Centos client issue.

Everything works fine using other Linux based OS's as clients.

Since we have such a huge investment in Centos, I must figure out a workaround. Apple support wasn't much help as usual however they were very nice.

There usual response is "its unsupported".

If Apple really wants to play in the enterprise of business space, they really need to change there philosophy. I mean telling me that I shouldn't mount home directories via NFS is completely rediculus.

What am I supposed to use then, Samba of AFP? No, I don't think so. No offense to Microsoft but why would I use a Windows based file sharing protocol to mount network shares in a Nix env???

Nov 28, 2008 3:46 AM in response to Brian Krusic

I haven't had any issues work from OSX to Ubuntu or FreeBSD. I had numerous issues getting CentOS to cooperate with OSX .. or with Ubuntu .. or with FreeBSD.

The only time I've ever seen those read errors is when I try to write a file in vim and I forgot to sudo. Wish I could have been more helpful but at least you know it doesn't affect all *nix/bsd.

Jan 20, 2009 6:07 AM in response to Brian Krusic

I have the exact same problem. A Leopard Server (10.5.6) shares a data directory with AFP to mac clients, SMB to windows clients and NFS to linux clients. The share has 1 ACL (allow read & write to a group, applies to this folder, child files, child folders, all descendants. Macs and Windows PC's seem to do fine. The Linux clients (mostly Fedora 6-10) can automount into /net/servername/Volumes/.../sharename and read all files. They can also create / delete files and folders. However, when they EDIT a file, they can't save it, unless they use VI with "wq!". Other text editors like gedit can't save edited files (no permissions). When I mount the share with samba, it gives exactly the same problem. Comments are welcome.

vi error on nfs mount; E212: Can't open file for writing

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.