SOLVED Files won't delete from SMB Clients

TravisT

Patron
Joined
May 29, 2011
Messages
297
I'm having a strange problem with TrueNAS. I'm currently running TrueNAS-12.0-U5.1

I've been using this file server and these shares for many years now. Yesterday I noticed that when deleting documents from my MacOS client, the files would delete but shortly after would return. I thought it may be a MacOS specific thing, but I fired up a windows VM, connected to the share and I'm getting the same results.

The files look as if they delete (no indication otherwise) but will return in Finder/Explorer shortly after deleting them. I've also checked on the TrueNAS server through the shell and the files are NOT deleting. I think this is somehow a permissions thing, because when I delete the same file from the TrueNAS shell, it deletes and does not return.

My permissions have always seemed to be wonky, but have worked. I have compared other "working" shares and mirrored permissions and settings exactly, applied recursively.

Any ideas?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
What does the smbd.log say when you send a delete request?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
What are the exact permissions? I've noticed some users have chosen to omit `delete` and `delete child` permissions from ACL entries, which may have impact on ability to delete files.
 

TravisT

Patron
Joined
May 29, 2011
Messages
297
What does the smbd.log say when you send a delete request?
I'm not seeing the smbd.log in the /var/log/ folder. Am I looking in the right place?

What are the exact permissions? I've noticed some users have chosen to omit `delete` and `delete child` permissions from ACL entries, which may have impact on ability to delete files.
1633100972073.png

Above is what it is currently (I've tried a few things since discovering this problem).

This is how my other datasets are configured:
1633101203011.png
 

TravisT

Patron
Joined
May 29, 2011
Messages
297
scratch that about the log... found it (/var/log/samba4/log.smbd)

There are a ton of
Code:
ixnas_ntimes: utimensat failed: Operation not permitted
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Although TrueNAS is based on FreeBSD and not Linux, the following discussion is very helpful in understanding what's going on: https://lists.gnu.org/archive/html/bug-coreutils/2015-12/msg00042.html.

Basically, it appears ixnas_ntimes VFS module checks if you have delete permissions before actually deleting the file by trying to set the deletion time of the file inode. If this fails, you get the error you see in log.smbd. Your permissions are somehow incorrect.
 
Last edited:

TravisT

Patron
Joined
May 29, 2011
Messages
297
Think I got it figured out. It's strange to me that it doesn't give any indication from the client side that there is a privilege issue...

Thanks for the help!
 
Top