Samba - can't delete files

Issues related to configuring your network
Post Reply
golfkilo
Posts: 3
Joined: 2021/07/14 15:49:15

Samba - can't delete files

Post by golfkilo » 2021/07/14 16:05:39

Hi,

I have a very simple smb share, no problems creating files with the correct permissions. Moving files and folders also works.
But deleting files doesn't. There is no error message in windows explorer and it looks initially as if they were deleted.

The files are still there and a refresh of the windows explorer will show them again. Linux permissions look fine.

my smb.conf

[global]
kerberos method = secrets and keytab
template homedir = /home/%U@%D
workgroup = DOMAIN
template shell = /bin/bash
security = ads
realm = DOMAIN.COM
idmap config MUSIC : range = 2000000-2999999
idmap config MUSIC : backend = rid
idmap config * : range = 10000-999999
idmap config * : backend = tdb
winbind use default domain = yes
winbind refresh tickets = yes
winbind offline logon = yes
winbind enum groups = no
winbind enum users = no

[myshare$]
path = /mnt/myshare
read list = +"DOMAIN\ReadGroup"
valid users = +"DOMAIN\WriteGroup" +"DOMAIN\ReadGroup"
write list = +"DOMAIN\WriteGroup"
writeable = yes
force create mode = 0660
force directory mode = 2770
force user = samba
force group = samba

G.

BShT
Posts: 583
Joined: 2019/10/09 12:31:40

Re: Samba - can't delete files

Post by BShT » 2021/07/14 18:09:22

try to set

force create mode = 0777
force directory mode = 0777
force user = nobody
force group = nobody

i had some problems to force linux user and group if they exist in windows domain

and

you should be right if your domain users and groups are ok as you rely on them as a domain client

golfkilo
Posts: 3
Joined: 2021/07/14 15:49:15

Re: Samba - can't delete files

Post by golfkilo » 2021/07/15 08:17:41

Hi,

tried all of those. "nobody" doesn't work anymore since a recent update.
There is no user "samba" in the domain.
As I said, everything works as expected apart from deleting files and folders.

golfkilo
Posts: 3
Joined: 2021/07/14 15:49:15

Re: Samba - can't delete files

Post by golfkilo » 2021/07/20 13:20:55

It's solved now, not 100% happy but will do.
The force parameters are to blame.

Had to change it all to 666 / 777 as it's all used by a handful of NFS clients as well. :(

[myshare$]
path = /mnt/myshare
read list = +"DOMAIN\ReadGroup"
valid users = +"DOMAIN\WriteGroup" +"DOMAIN\ReadGroup"
write list = +"DOMAIN\WriteGroup"
read only = no
create mask = 666
directory mask = 777

Post Reply