in reply to 'flock' with multiple users

If all users are on the same machine, there should not be any problems.

If you try to place a lock file on an NFS share, good luck. Locking on NFS has a long and ugly history, so better don't hope for working locks on NFS. (See also http://man7.org/linux/man-pages/man2/flock.2.html#NOTES) For other networked filesystems, RTFM. But don't expect miracles. Getting locks right transparently over a network is not trivial.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)