6 Replies Latest reply: Jan 20, 2009 6:07 AM by Tim Plessers
Brian Krusic Level 1 Level 1 (15 points)
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)
  • Brian Krusic Level 1 Level 1 (15 points)
    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???
  • Brian Krusic Level 1 Level 1 (15 points)
    Hi all,

    I've determined that its a problem using the 2.6 Linux kernel in combo with OD and NFS. Using 2.4 kernels of any distro works normally.

    I have strace and tcpdump outputs if any one would like to help decode them with me.
  • Brian Krusic Level 1 Level 1 (15 points)
    Ok, so comparing user vs root (strace output) when writing to the file, I see 2 major discrepancies;

    ** successful operation

    fchown(3, 1199, 20) = 0

    ** unsuccessful operation

    fchown(4, 1199, 20) = -1 EPERM (Operation not permitted)

    Keep in mind that this is upon a file with 777 and all users having a umask of 0.

    Can any one comment?
  • Brian Krusic Level 1 Level 1 (15 points)
    Ok, this will soon be an official bug as I just reported it with the Apple dev site.

    The bug was unofficially verified by an Apple developer.
  • miks23 Level 1 Level 1 (0 points)
    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.
  • Tim Plessers Level 1 Level 1 (0 points)
    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.