Loading ...
Sorry, an error occurred while loading the content.

Problems with writing files on mounted Samba-Share

Expand Messages
  • Guido Boehm
    Hi, I ve got a strange problem which occurs only with vim and i have no clue how to fix this, that s why i m writing to this list now.. first i ll describe the
    Message 1 of 1 , Mar 28, 2002
    • 0 Attachment
      I've got a strange problem which occurs only with vim and i have
      no clue how to fix this, that's why i'm writing to this list now..
      first i'll describe the systems:

      my workstation:
      FreeBSD 4.4-RELEASE
      mount_smbfs: version 1.1.0
      vim: 6.0av
      (i just tried with
      Included patches: 1-11, 13-26, 28-34, 36-47, 49-52, 54-63, 65-69, 71-72, 74-86, 88-92, 94-105, 108-114, 118, 120, 124, 126-134, 136, 139-160, 163, 166-178, 180-185,
      but didn't work neither)

      Linux 2.2.16-22
      Samba (smbd) Version 2.2.0
      <-- smb.conf -->
      # Global parameters
      hide dot files = No
      writable = yes
      encrypt passwords = Yes
      domain logons = Yes
      unix password sync = Yes
      server string = Fileserver
      create mask = 0775
      socket address =
      directory mask = 0775
      path = /home/projects/
      force group = xxxx
      <-- /smb.conf -->

      the problem:
      if i open an exiting file and changed something inside of it
      using vim and try to write out the changes afterwards with
      :w oder :w! i get the error message
      "foo.bar" E212: Can't open file for writing,
      but after some tries with :w it works and the file get's written.
      the number of tries looks some kind of increasing if i open
      more files in the same vim-instance with :e and try to write
      them out. all other programms which do file-access to the
      shares (gimp, sylpheed, bash (with >), etc) work without
      any problems.

      what i did to find/fix this error:
      i tried to play with the source although i'm a really bad
      c-hacker. i looked into fileio.c and found that part where
      the E212 message resides. i printed errno and (char *)wfname
      after mch_open failed (right in front of "if (errmsg == NULL)").
      errno got set to '2' which is by my manual-page
      2 ENOENT No such file or directory.
      (char *)wfname is always the same if it fails and if it doesn't.
      permissions of the mounted-share-file would be
      -rwxr-xr-x 1 lenix users 14 Mar 28 14:49 foo.bar
      (yes, i'm logged in as user lenix)

      and after all i've got no idea what to try next. i already checked
      google but it looks like nobody else ever had that problem before.
      i hope anybody can help me 'cause it really sucks if you have
      to type :w about 20 times for each file you edit ;)

      regards and thanks for this great editor, lenix
      www: http://lenix.de
      fon: +49 173 80 99 196
    Your message has been successfully submitted and would be delivered to recipients shortly.