Find the answer to your Linux question:
Results 1 to 5 of 5
I have a samba server which is serving a mixture of files. One main application uses a data file and creates a temporary working execution file at startup and holds ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie humbletech99's Avatar
    Join Date
    Nov 2005
    Posts
    225

    Samba - prevent locking of selected files over network?


    I have a samba server which is serving a mixture of files. One main application uses a data file and creates a temporary working execution file at startup and holds that temp execution file open for the duration of the program's execution (but doesn't use the file at all after initial startup).

    The problem is when a second user wants to run the application (and they all do) they cannot create/replace the temp file because it is file locked over the network by the other running copy of the application, despite the application not using it any more. The application is a long running program, we're talking hours at a time.

    This results in us having to remove the file from the unix file system manually at user request so the next user using the application against the share succeeds in creating the temp file and starting up.

    So the question is, is it possible to selectively disable file locking over the network in samba (preferably by regex)
    The Human Equation:

    value(geeks) > value(mundanes)

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,906
    It would seem that The Samba Website has detailed information on this subject.

    I couldn't find a way to do it by regex, it looks like you do it per-share.
    Linux user #126863 - see http://linuxcounter.net/

  3. #3
    Linux Newbie humbletech99's Avatar
    Join Date
    Nov 2005
    Posts
    225
    Thanks for the link, I have come across this before, but if I disabled locking for the whole share then documents and other things that are stored on the share and used by multiple people would be corrupted when 2 people try to use the same file at the same time.

    It's only this 1 program's files which it is ok to do this for. Unfortunately it needs to be stored along side data files and documents and it works on the data and where the data is is where it creates it's execution temp files.
    The Human Equation:

    value(geeks) > value(mundanes)

  4. $spacer_open
    $spacer_close
  5. #4
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,906
    I know this is a stupid quiestion, but is there any way you can control where the application puts its temp files? The last place you want to write them is over the network unless you have no other choice. The ideal place would be in a local temp directory or (even better) a local ramdisk. This would speed things up for the end users.
    Linux user #126863 - see http://linuxcounter.net/

  6. #5
    Linux Newbie humbletech99's Avatar
    Join Date
    Nov 2005
    Posts
    225
    No this proprietary app writes it's program execution plan file alongside the file that it is working from.
    The Human Equation:

    value(geeks) > value(mundanes)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •