Vim on SMB share

Daren Russell darenr at
Fri Sep 10 01:22:38 PDT 2004

Charles Ulrich wrote:
> Daren Russell said:
>>I know this is slightly OT, but it is still using FBSD!
>>I have a SMB share mounted, and can generally write to it.  I can copy
>>files to it, delete them, use 'ee' to edit and save them.
>>However, when using Vim, I can load and edit without warning, but if I
>>try to save it I get "E212: Can't open file for writing"
>>I can however create a new file on the share using Vim without problems,
>>try to edit it and get the same problem.
>>Whilst using Gentoo Linux, I did not have an issue with this (but that
>>box has destroyed itself, hence the move to a FBSD box)
>>Is this a known thing with Vim/SMB/FBSD?  Any ideas on something stupid
>>I have overlooked?
> Hi,
> I recall running into this and other problems when I was using Samba 3.x on a
> 4.10 FreeBSD server and smbfs on a 5.2.1 FreeBSD client. In frustration, I
> updated the server to 5.2.1 and downgraded Samba to 2.x and haven't had
> problems since. I'd have a hard time believing that going to 5.2.1 on the
> server side fixed the problem. Rather, I suspect that FreeBSD's smbfs has had
> little attention lately and doesn't like the changes that have been made to
> Samba since 2.x.
> Alternatively, some of the recent patches to 5.2.1 may have had some positive
> effect on the client's smbfs. Wish I could be more specific on all of this.
> Charles Ulrich

Thanks for the ideas.  The server side is Win2k (so not much I can do 
there!), the BSD is using version 3 of the Samba client, so I'll try 
downgrading it to version 2 and see how I go.

I guess it must also be to do with the way Vim edits files, as the basic 
FBSD editor (ee) seems to manage.


More information about the freebsd-questions mailing list