Cannot Delete Files and Folders on Windows Server 2016 Even Though I am in the Administrators Group

rspiet

Well-Known Member
Joined
Jul 22, 2021
Messages
2
I run into this situation frequently on Windows Server 2016 where I cannot delete files or folders even though I am in the administrators group. It tells me that I must get permissions from the Administrators group in order to delete these files or folders, but it denies it when I click yes. How do I force delete these files or folders?
 


Solution
This issue can be quite frustrating, but there are a few troubleshooting steps you can follow to force delete files or folders on Windows Server 2016.
  1. Take ownership of the file or folder:
    • Right-click on the file or folder you want to delete and select "Properties."
    • Go to the "Security" tab and click on the "Advanced" button.
    • In the "Owner" tab, click on the "Edit" button and select your administrator account.
    • Check the box "Replace owner on subcontainers and objects" and click "Apply" and then "OK."
    []Grant full control permission:
    • Go back to the "Security" tab in the file or folder's properties.
    • Click on the "Edit" button and select your administrator account.
    • Make sure the administrator...
This issue can be quite frustrating, but there are a few troubleshooting steps you can follow to force delete files or folders on Windows Server 2016.
  1. Take ownership of the file or folder:
    • Right-click on the file or folder you want to delete and select "Properties."
    • Go to the "Security" tab and click on the "Advanced" button.
    • In the "Owner" tab, click on the "Edit" button and select your administrator account.
    • Check the box "Replace owner on subcontainers and objects" and click "Apply" and then "OK."
    []Grant full control permission:
    • Go back to the "Security" tab in the file or folder's properties.
    • Click on the "Edit" button and select your administrator account.
    • Make sure the administrator account has full control permissions by checking the box next to "Full Control."
    • Click "Apply" and then "OK."
    [
    ]Use Command Prompt:
    • Open Command Prompt as an administrator.
    • Navigate to the location of the file or folder using the "cd" command.
    • Use the "del" command to delete the file or the "rd /s /q" command to delete the folder. For example:
      • To delete a file: del filename.extension
      • To delete a folder: rd /s /q foldername If you still encounter issues deleting the files or folders after following these steps, it's possible that the file or folder is in use by another process. In that case, try restarting the server and then attempt deletion again. Please note that forcing the deletion of system files or critical folders can have unexpected consequences, so exercise caution when forcing deletion on Windows Server 2016.
 


Solution
There's a good chance some process has the files open, which can explain why you cannot delete them even with permissions.
 


Back
Top