Help with deleting files over SMB share

I am having problems deleting files with Windows File Explorer from an SMB shared folder residing on a NAS (machine specs are at the end).

I can copy a file from the share to a drive resident on the PC, or edit it directly from the NAS, but when I try to delete the NAS version, WinExplorer says it can’t locate the item and is unable to delete it. The file is still there afterwards, as I can copy it again.

Other areas of the wider SMB share are fine, and deletions can occur as expected.

I looked at the ACL permissions of the share using the standard shell command, with the following results:

getfacl /mnt/server/mike_stuff

# owner: nobody
# group: nogroup
            owner@:rwxpDdaARWcCos:fd-----:allow
            group@:rwxpDdaARWcCos:fd-----:allow
         everyone@:rwxpDdaARWcCos:fd-----:allow
         everyone@:--------------:fd-----:allow

Firstly, it doesn’t sound normal to have two sets of permissions for ‘everyone@’!!

Navigating step-by-step to the subdirectory of interest shows an identical report for each. However when I add the filename to the full string pointing to that subdirectory I get:

'stat() failed: No such file or directory'

even though the file is still visible in WinExplorer and accessible for read operations.

I would sincerely appreciate some assistance in solving the problem, if it is with the permissions. Thanks in advance!

Machine specs
-------------
TrueNAS-12.0-U8.1
SuperMicro X10SDV-4C+-TLN4F
32GB ECC RAM
4 x 4TB in RAIDZ1

Edition	Windows 11 Pro
Version	23H2
Installed on	‎16/‎12/‎2022
OS build	22631.4317
Experience	Windows Feature Experience Pack 1000.22700.1041.0

What is output of SMB configuraiton? testparm -s
There is a technical reason for the two everyone@ entries. It is not a bug.

NOTE: 12.0-U8.1 is end-of-life and should not be used in production environments

Many thanks for the reply, @awalkerix . That’s a relief to know about the apparent double-entry for everyone@.

Thanks also for the note about TN Core 12. I aim to move to TNC 13 last release, once this and other issues are sorted out.

The output of ‘testparm’ is below:

root@freenas:~ # testparm -s
Load smb config files from /usr/local/etc/smb4.conf
Loaded services file OK.
Weak crypto is allowed
Server role: ROLE_STANDALONE

Where’s the rest of the output?

Apologies - went off the bottom of the shell window:

root@freenas:~ # testparm -s
Load smb config files from /usr/local/etc/smb4.conf
Loaded services file OK.
Weak crypto is allowed
Server role: ROLE_STANDALONE

# Global parameters
[global]
        aio max threads = 2
        bind interfaces only = Yes
        disable spoolss = Yes
        dns proxy = No
        enable web service discovery = Yes
        kernel change notify = No
        load printers = No
        logging = file
        max log size = 5120
        nsupdate command = /usr/local/bin/samba-nsupdate -g
        registry shares = Yes
        restrict anonymous = 2
        server role = standalone server
        server string = FreeNAS Server
        unix extensions = No
        idmap config *: range = 90000001-100000000
        idmap config * : backend = tdb
        directory name cache size = 0
        dos filemode = Yes
[Mike]
        comment = Mike's share
        ea support = No
        path = /mnt/server/mike_stuff
        read only = No
        vfs objects = zfs_space zfsacl streams_xattr
        nfs4:chown = true

The vfs objects are out of order which may cause deletion problem. I can’t recall off the top of my head if this is a 12.0 bug. If you don’t have auxiliary parameters for the share set (which tends to break things magnificently in many situations), then upgrade to 13.3.

Great, thank you. I haven’t knowingly set any auxiliary permissions, so will indeed go ahead with the upgrade to 13.3.

Thanks for all the help :slight_smile: !

Just wanted to update this thread to say the upgrade to 13.3 went fine and now all the problems associated with deleting files on the NAS via SMB have gone.

Many thanks again for all the help :slight_smile:

1 Like