[Samba] Samba 4.11 "Stale file handle"

Andrew Walker walker.aj325 at gmail.com
Sun Sep 22 00:42:11 UTC 2019


Can you please post your smb.conf?

On Sat, Sep 21, 2019 at 12:45 PM Kacper via samba <samba at lists.samba.org>
wrote:

> Hello,
>
> After upgrading to Samba 4.11 (from 4.10) I noticed that python
> scripts using tempfile.mkstemp fail when run against samba cifs
> mounts. Before I submit a bug report, could someone else try this out
> so it's not just my setup?
>
> How to reproduce:
> 1. Mount a Samba 4.11 share using the mount command: mount
> //server1/share /tmp/share1
> 2. Run python script that is using mkstemp:
>     import shutil
>     import tempfile
>
>     tmp_dest_fd, tmp_dest_name = tempfile.mkstemp(prefix=b'.file_tmp',
> dir='/tmp/share1', suffix='test.pdf')
>     shutil.move('testfile', tmp_dest_name)
>
> Result:
> Traceback (most recent call last):
>   File "./test.py", line 9, in <module>
>     shutil.move('testfile', tmp_dest_name)
>   File "/usr/lib64/python2.7/shutil.py", line 301, in move
>     copy2(src, real_dst)
>   File "/usr/lib64/python2.7/shutil.py", line 130, in copy2
>     copyfile(src, dst)
>   File "/usr/lib64/python2.7/shutil.py", line 83, in copyfile
>     with open(dst, 'wb') as fdst:
> IOError: [Errno 116] Stale file handle:
> '/tmp/share1/.file_tmplB0NqLtest.pdf'
>
> Expected results:
> The operation should succeed without a stale file handle error.
>
> Environment:
> Centos 7.6 / 3.10.0-1062.el7.x86_64
> Python 3.6 / 2
> Samba 4.11
>
> Regards,
> Kacper
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>


More information about the samba mailing list