Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 2004 10:44:04 +0100
From:      Daren Russell <darenr@end-design.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: Vim on SMB share
Message-ID:  <ci3q54$eop$1@sea.gmane.org>
In-Reply-To: <20040910172425.GB6765@orion.daedalusnetworks.priv>
References:  <chpuca$7ri$1@sea.gmane.org> <37275.24.11.146.21.1094748592.squirrel@freedombi.com> <chro88$5fd$1@sea.gmane.org> <20040910172425.GB6765@orion.daedalusnetworks.priv>

next in thread | previous in thread | raw e-mail | index | archive | help
Giorgos Keramidas wrote:
> On 2004-09-10 09:22, Daren Russell <darenr@end-design.co.uk> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ci3q54$eop$1>