View previous topic :: View next topic |
Author |
Message |
humbletech99 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/781050335437c44a8039b0.jpg)
Joined: 26 May 2005 Posts: 1229 Location: London
|
Posted: Tue Jul 14, 2009 9:23 am Post subject: 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) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
cwr Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Tue Jul 14, 2009 10:48 am Post subject: |
|
|
I think you're going to have to look at the application, and persuade it to put its
temporary files somewhere else. Or you could could set up cron, to automatically
delete any temp files found, but I really don't like that approach.
Will |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
humbletech99 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/781050335437c44a8039b0.jpg)
Joined: 26 May 2005 Posts: 1229 Location: London
|
Posted: Tue Jul 14, 2009 10:54 am Post subject: |
|
|
I was thinking of going the cron rm approach once per minute... or just having a long running script checking every 30 secs or something... and rm-ing it.
Not perfect but easy to do...
Unless anyone knows how to bend samba's file locking to my will? _________________ The Human Equation:
value(geeks) > value(mundanes) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|