Hi, GreenLeaf64,
This can be done in two different ways, using takeown or icacls.
This command will take ownership of the folder or drive, and all files and subfolders in the folder or drive.
Open an elevated command prompt (administrator).
To grant ownership to administrators group:
takeown /F "full path of folder or drive" /A /R /D Y
Open an elevated command prompt (administrator).
To set administrators group as owner:
icacls "full path of folder or drive" /setowner "Administrators" /T /C
https://superuser.com/questions/813878/how-woul...
Try ICACLS and/or TAKEOWN with the below syntax against the folder with the username as needed.
Try just the ICACLS commands first and if that doesn't resolve, run the TAKEOWN commands and then run the ICACLS commands again.
ICACLS Commands
Grant explicit full control access to this folder to all beneath subfolders, and files leaving all inherited permissions in place and continue on error
ICACLS "<FolderPath>" /INHERITANCE:e /GRANT:r <UserName>:(F) /T /C
Grant explicit modify access to this folder to all beneath subfolders, and files leaving all inherited permissions in place and continue on error
ICACLS "<FolderPath>" /INHERITANCE:e /GRANT:r "<UserName>":(M) /T /C
Change the owner of this folder and all beneath subfolders and files and continue on error
ICACLS "<FolderPath>" /SETOWNER "<UserName>" /T /C
TAKEOWN Commands
Run this as the account which you want to grant ownership to, and it'll be changed to the owner of the folder and all beneath subfolders and files
TAKEOWN /F "<FolderPath>" /R /D Y
https://superuser.com/questions/1100532/command...
Note: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.