Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Samba - prevent locking of selected files over network?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
humbletech99
Veteran
Veteran


Joined: 26 May 2005
Posts: 1229
Location: London

PostPosted: Tue Jul 14, 2009 9:23 am    Post subject: Samba - prevent locking of selected files over network? Reply with quote

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
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Tue Jul 14, 2009 10:48 am    Post subject: Reply with quote

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
View user's profile Send private message
humbletech99
Veteran
Veteran


Joined: 26 May 2005
Posts: 1229
Location: London

PostPosted: Tue Jul 14, 2009 10:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum