2

Weird issue copying files to a samba share

I'm having this weird issue where I connect to a samba share (my home directory) in my Linux server from a windows client, when I try to copy some files, some of them success, others fail with access denied message, even when it's the same directory.

It doesn't seems to be a file name issue (tried renaming to something with a couple of alphabetic characters) nor a size issue, some bigger files are copied without problem.

It seems for some reason it assumes some files already exist there (they don't) because I'm asked if I want to overwrite, if I accept the file is written empty and the access denied message pops up.

Can this be some kind of cache issue? I can see a pattern where the files that fail were already in that disk (under a different directory tho).

8
  • Your Samba share must have at least the following settings for permissions for correct operation in Windows: create mask = 0660 (new files created will be given 0660 permissions for the Samba user creating them) & directory mask = 0750 (new directories created will be given 0750 permissions for the Samba user creating them). The share's directory must be owned by either the Samba user or a group the Samba user is apart of (if the latter, directory permissions must be 0770) and file/directory permissions must be 660/750||770.
    – JW0914
    Jan 8, 2020 at 14:02
  • @JW0914 please note I explained some files copy just fine.
    – SP12892
    Jan 8, 2020 at 14:03
  • Do you have all the above set? If so, check the Samba server's log file to determine what's going on.
    – JW0914
    Jan 8, 2020 at 14:04
  • Nothing relevant at /var/log/samba/ log.client_ip is empty.
    – SP12892
    Jan 8, 2020 at 14:06
  • @JW0914 and yes, I have tried different masks, from 0 to 0777, makes no difference.
    – SP12892
    Jan 8, 2020 at 14:13

2 Answers 2

2

I had the same issue here. I've cross-validated this issue and found out that if I used other samba-client software like ones in Android, there won't be any problems in copying or replacing files; also if I used another Windows computer and launch Windows Explorer to copying files, there won't be any problems in copying or replacing files.

It's very weird, and I still cannot locate the problem.

0

Exactly same issue here. While error message unclear, in my case Windows' Attachment Manager's policy was a cause. https://support.microsoft.com/en-gb/topic/information-about-the-attachment-manager-in-microsoft-windows-c48a4dcd-8de5-2af5-ee9b-cd795ae42738

I resolved it after 'unblocking' a file with admin rights by

RMB on file -> Properties -> General Tab -> Security section -> Click on Unblock checkbox

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .