I’m fighting a problem that I’ve not encountered before, student files are on an SMB, this is also where their account profiles are stored.
There is a policy set to embed admin permissions into all their files when they are created, normally I can just delete everything which is done after they graduate or choose to not return.
Today I went through and tried to clean up these folders, and most of them give me a permission error. Normally I just change the security to where I’m the owner, and recursively apply this through their entire storage folder.
So I sat down to go through one by one and take ownership, like I have in the past, and then delete. I get the following warning telling me that I need to give permission for to myself to remove files that I now own:
The crossed out part is my domain\account.
Thinking this might be a Windows 11 issue, I logged into one of my Server 2022 (Jan. 2025 updates) and tried, same error.
I then tried Midnight Commander, this freezes when I try to navigate through the folders.
Then I tried updating from 13.0-u6.2 to 13.0-u6.4, still nothing. Upgrade to 13.3-u1 to see if anything changed, still not able to delete these files. But I can rename them, original name for the above folder was app which is part of the roaming profile, now it reads apptest. I check permissions, and I really own it and have full control, looked for hidden files, none present. Back to Truenas and looked for shell and I no longer find the shell button in the left hand menus (need to look around more), was going to try MC again because if it lets me chmod the files to 7777 -recursive and then delete them.
These files are done so that Creator/Owner gains control once the user folder is created. Exception being the above when administrator is forced to have control which is supposed to let me handle these files without so much trouble. Because of the Creator/Owner, forcing a broad change in the ACL with recursive is going to give other users access to other files, and that’s not a good idea.
This config has worked for over a decade now and I’m having a problem figuring out how to fix this. My last ditch effort will be wait until summer and delete the entire vdev and build it fresh. Some of these files were created on Windows 10, some Windows 11, no ryhme nor reason between which are allowed to be deleted and which are not, but the not deleted are the majority.