#137 Can not save over file on samba share.

open
nobody
None
5
2013-01-28
2012-05-29
FaithHack
No

If i save a file on a samba share, I can not save it a second time or save over another currently existing file on the share. A zero size file is created instead.

Discussion

  • I don't have a Samba share, so I can't reproduce this. Please start gscan2pdf with

    gscan2pdf --log=log

    try to overwrite an existing file on the Samba share, quit, and post the log file.

    Please also do the same on a file on a local drive for comparison.

     
  • FaithHack
    FaithHack
    2012-06-04

    I ran gscan2pdf twice - first time as:
    $ gscan2pdf --log=gscan2pdf-smb.log
    I scanned two pages (same content twice), saved the document in a directory symlinked to my samba share.
    I have gscan set to open docs with acroread on save and everything looked good.
    I then scanned the same page twice more, adding to my current doc (did not shutdown) and saved again.
    I got no error, except acroread reported the file as damaged when it tried to open it.

    I follow the same above process on my local file system and everything worked fine.

    I did find out that the second file created on the samba share (the corrupted one) was not zero size - it was, infact, very close to the size of the first tow page scan + the second four page scan instead of being the size of just the 4 page scan like you would expect.

    I will attach the smb log, the local fs log, the two page scan from the local fs, the four page scan from the local fs, and the corrupted four page scan as saved to samba.

    My current work-around when I have to add pages to a scan after saving (to smb) is to manually delete the saved PDF just before re-saving, otherwize I have to save it to a local file system then manually copy it over the old PDF.

    Some more more info that might be helpful:
    OS: Ubuntu 12.04 LTS
    samba: 3.6.3
    smb file system mounted via fuse (using nautilus) and symlinked to a local directory.

     
  • FaithHack
    FaithHack
    2012-06-04

    log from saving over samba

     
    Attachments
  • FaithHack
    FaithHack
    2012-06-04

    log from saving on local fs

     
    Attachments
  • FaithHack
    FaithHack
    2012-06-07

    Turns out the demo PDFs are too big for sourceforge (>256K) - I'll find a place to upload them and paste a link