From owner-freebsd-questions@FreeBSD.ORG Mon Sep 13 17:03:01 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 12B6C16A50A for ; Mon, 13 Sep 2004 17:03:01 +0000 (GMT) Received: from main.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 985E743D5D for ; Mon, 13 Sep 2004 17:03:00 +0000 (GMT) (envelope-from freebsd-questions@m.gmane.org) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1C6nNX-0007uK-00 for ; Mon, 13 Sep 2004 11:44:07 +0200 Received: from dsl-62-3-100-125.zen.co.uk ([62.3.100.125]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Sep 2004 11:44:07 +0200 Received: from darenr by dsl-62-3-100-125.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Sep 2004 11:44:07 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Daren Russell Date: Mon, 13 Sep 2004 10:44:04 +0100 Lines: 47 Message-ID: References: <37275.24.11.146.21.1094748592.squirrel@freedombi.com> <20040910172425.GB6765@orion.daedalusnetworks.priv> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: dsl-62-3-100-125.zen.co.uk User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040421 X-Accept-Language: en-us, en In-Reply-To: <20040910172425.GB6765@orion.daedalusnetworks.priv> Sender: news Subject: Re: Vim on SMB share X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2004 17:03:01 -0000 Giorgos Keramidas wrote: > On 2004-09-10 09:22, Daren Russell wrote: > >>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. > > > Vim tries to create a file called .FILENAME.swp when you edit FILENAME. > The leading dot is probably what breaks the way vim works on Samba > shares. You can always try to make vim write its swap files in another > location, i.e. in `/var/tmp' with this in your .vimrc: > > set dir=/var/tmp > > or you can disable swapfiles altogether with > > set noswapfile > > You can even play nice tricks like selectively disabling the swapfile > only for files that "live" in the well-known path of your Samba shares > with something similar to this in your .vimrc: > > if !exists("samba_swapfile_hack") > let samba_swapfile_hack = 1 > autocmd BufNewFile,BufRead /share/win2k/* set noswapfile > endif > > Unless, of course, my guess is wrong and all this is nonsense :-) > > Giorgos > I tried it on another FBsd box we have running 4.10 (the first box was running 5.something) and it worked fine. Comparing them it appears to have been something to do with group permissions, although the user had full rwx access, they weren't in the group that the share was mounted with. The 4.10 box had the directory the share was mounted on set to the users user/group by default. I'm guessing SMBFS is a bit paranoid about user/group security (probably a good thing though!) Daren