Re: Vim on SMB share
Giorgos Keramidas wrote: On 2004-09-10 09:22, Daren Russell [EMAIL PROTECTED] 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 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Vim on SMB share
Charles Ulrich wrote: Daren Russell said: Hi, 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? Thanks Daren 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. Regards Daren ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Vim on SMB share
On 2004-09-10 09:22, Daren Russell [EMAIL PROTECTED] 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 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Vim on SMB share
Daren Russell said: Hi, 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? Thanks Daren 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 -- Charles Ulrich System Administrator Ideal Solution - http://www.idealso.com ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]