Permission denied to delete thumbs.db file
Applies to
- ONTAP 9
 - CIFS
 
Issue
- CIFS share can't be deleted
 - thumbs.db file in share
 - Deletion fails
 
PS K:\empty> dir Directory: K:\empty Mode LastWriteTime Length Name ---- ------------- ------ -----a---- 06/22/2023 13:03 0 test2.txt PS K:\blank> dir test2.* -File -Recurse -ErrorAction SilentlyContinue -Force | Remove item PS K:\empty> dir PS K:\empty> PS K:\blank> dir thumbs.db -File -Recurse -ErrorAction SilentlyContinue -Force | Remove item Remove-Item : The item K:\empty\Thumbs.db cannot be removed: you do not have enough Access permissions to perform this operation. In Line:1 Character:69 + ... .db -File -Recurse -ErrorAction SilentlyContinue -Force | Remove item + ~~~~~~~~~~~ + CategoryInfo : PermissionDenied: (K:\empty\Thumbs.db:FileInfo) [Remove-Item], IOException + FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
- Access Based Enumeration (ABE) not enabled
 
Share: XXXXXXXXX
                     CIFS Server NetBIOS Name: SVM-NAS
                                         Path: /svm_nas_cifs/data/XXXX
                             Share Properties: browsable
                                               show-previous-versions
                                               oplocks
                                               changenotify
                           Symlink Properties: symlinks
                      File Mode Creation Mask: -
                 Directory Mode Creation Mask: -
                                Share Comment: User data
                                    Share ACL: everyone / Full Control
                File Attribute Cache Lifetime: -
                                  Volume Name: svm_nas_cifs
                                Offline Files: manual
                Vscan File-Operations Profile: standard
            Maximum Tree Connections on Share: 4294967295
                   UNIX Group for File Create: -
