'Samba user share with bindfs --enable-lock-fowarding --enable-ioctl --multithreaded

I tried to use bindfs to share the files by Samba.

bindfs --enable-lock-fowarding --enable-ioctl --multithreaded /data/share1 /home/user1/share1
bindfs --enable-lock-fowarding --enable-ioctl --multithreaded /data/share1 /home/user2/share1

In linux filesystem, flock is works well because of --enable-lock-fowarding.

I shared it by Samba. smb.cnf

[homes]
path = /home/%S

but when user1 and user2 use same file(sample1.xlsx), file locking never work because internal path becomes different one.

*file path for user1

/home/user1/share1/sample.xlsx

*file path for user2

/home/user2/share1/sample.xlsx

Is there good way to enable lock on Samba?



Solution 1:[1]

[homes] is a special Samba share and does not take a 'path' parameter, try a different share.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rowland Penny