I'm running a CentOS server with Samba. Connected on the LAN is one Windows 7 PC and the rest are Macs and Linux. The Macs don't have this problem, but on the Windows PC when a user attempts to move a file on the same share from one folder to another, it doesn't "move" them. It makes a copy of the file to the destination and doesn't remove the source file.
This doesn't happen all the time, but it seems to be happening more when the file is created from one of the Macs (all running El Capitan). The problem has not occurred when the PC user moves a file they have created.
What can I try to trouble-shoot this?
Could this be an issue with the smb.conf file? How should it be set-up so that all users of the file server have read/write access to all the files on the share?
I find this very puzzling that it doesn't seem to be happening all the time, even though the files have the same owner/group and permissions.
Is there something I need to do on Windows 7 to make sure the client on there is working currently?
CentOS release 6.7 (Final) Samba version 3.6.23-24.el6_7
The share is 0755 permissions and is owned by smbuser and smbuser group.
The folder in the share has a permission of 0775, same owner/group as above.
The actual file has a permission of 0644 and is owned and belongs to group root. However in the smb.conf file, everything is forced to root (I believe):
[global]
workgroup = workgroup
netbios name = SERVER
browseable = no
available = no
wins support = yes
local master = yes
[SERVER]
comment = File Server
browseable = yes
valid users = smbuser,nobody,edward
force user = root
writeable = yes
path = /home/share
available = yes
Everyone (on the Macs) has access through user smbuser with the same password.
The Windows 7 PC, which I'm not entirely sure about since it has been so long since I set it up, I thought it was also using smbuser too. But now I can't find where that information is on the PC to verify this, or wipe it out and re-enter it. But if everyone is "force user = root" doesn't that mean, they would all be acting as "root"?
I have done a test where the PC created a folder and file on the share, and it is owned by root and the same group.
If I don't have this set-up properly, please let me know. We need all workstations to be able to read/write the same files. There is no reason for it to belong to a specific user.
A couple ways to trouble-shoot the Samba behavior you're describing.
strace
to trace the system calls from the user'ssmbd
process. Chapter 14 of the Samba Developer's guide describes Tracing samba system callssmbstatus
will show current samba connections and oplocks.