Note that there are some explanatory texts on larger screens.

plurals
  1. POSamba, CIFS and Deleting Files
    text
    copied!<p>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.</p> <p>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 <code>cifs79</code>, <code>cifs78</code> etc. They take up the same amount of space as the original file so I assume they <em>are</em> the originals, just renamed.</p> <p>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?</p> <p>I created my shares with this command:</p> <pre><code>mount -t cifs //10.251.251.251/uploads ./uploads -o username=samba_user,noexec </code></pre> <p>The files go into the share as <code>-rw-------</code> and remain that way after they change names.</p> <p>Here's the full <code>smb.conf</code> file: <a href="http://gist.github.com/172474" rel="nofollow noreferrer">http://gist.github.com/172474</a> and the result of running <code>smbstatus</code>: <a href="http://gist.github.com/172478" rel="nofollow noreferrer">http://gist.github.com/172478</a></p> <hr> <p>More info:</p> <p>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.</p> <p>Thanks for any help!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload