So I've got a Samba share located on server A. I have that share mounted to two other servers, B and C. The idea is that B and C need to write temporary files to a single location so that multiple background processing jobs (also running on B and C) have access to the same pool of files.
When the background processes are complete they delete the file they were working on. When I do a directory listing of the share after a file has been deleted the original files names are now along the lines of cifs79
, cifs78
etc. They take up the same amount of space as the original file so I assume they are the originals, just renamed.
The problem is these files don't go away unless I restart samba (which I don't plan on ever doing). Am I missing a simple config param that will delete files immediately?
I created my shares with this command:
mount -t cifs //10.251.251.251/uploads ./uploads -o username=samba_user,noexec
The files go into the share as -rw-------
and remain that way after they change names.
Here's the full smb.conf
file: http://gist.github.com/172474 and the result of running smbstatus
: http://gist.github.com/172478
More info:
If I manually create a file from the box that has the share mounted, I can create, edit, delete no problem. If I start an IRB (interactive ruby) session, I can use Ruby to create/delete files no problem. It seems to be the app itself which creates the file with strange permissions. Although the app and my IRB session are running as the same user, so they should have the same permissions to do whatever.
Thanks for any help!