• “you require permission from System to make changes to this folder”

    Home » Forums » AskWoody support » Windows » Windows 11 » Questions about Windows 11 » “you require permission from System to make changes to this folder”

    Author
    Topic
    #2594787

    Win11 Home

    I get power-failures too often where I live. After each one, a number of folders are left in my TEMP directory (on my D: drive). When I try to delete them I get the above message. I don’t know how to get System permission.

    As a temporary (I hope) work-around I rename my TEMP folder to something like xxxTEMP### (where ‘###’ is a number, currently @16), delete everything else in that folder, and create a new TEMP folder.

    Viewing 6 reply threads
    Author
    Replies
    • #2594820

      I get power-failures too often where I live.

      I would strongly suggest you eliminate the whole power out problem by getting a UPS (Uninterruptible Power Supply) for your computer.  It’s risky not to have one.

      My daily driver is a desktop and I have a Cyberpower UPS that powers my desktop machine, 4 27″ monitors, 2 modems, and a router for up to 35 minutes when the power goes out.  This gives you plenty of time save all your work, close all you apps and shutdown your computer normally.  My setup draws 160 watts, but you may not need that to provide that much.

      When I get a power out, I’ll usually wait for 5 or 10 minutes before I do anything.  If the power does not comeback on I’ll start the shutdown process.

      Check out the screenshot below.

      This the UPS I have for my setup.

      https://www.cyberpowersystems.com/product/ups/intelligent-lcd/cp1500avrlcd/

       

      Desktop Asus TUF X299 Mark 1, CPU: Intel Core i7-7820X Skylake-X 8-Core 3.6 GHz, RAM: 32GB, GPU: Nvidia GTX 1050 Ti 4GB. Display: Four 27" 1080p screens 2 over 2 quad.

      1 user thanked author for this post.
      • #2594970

        Thanks for the response.

        I’ll think about a UPS. Except for the few folders that can’t be deleted, there seem to be no other adverse affects, so I may live with the problem.

        1 user thanked author for this post.
    • #2594823

      I would be checking the disk for errors after those power outages.

      1. Press Win R.
      2. Type :cmd
      3. Press Ctrl Shift Enter to get the admin Command Prompt.
      4. Type: chkdsk C:
      5. Type: chkdsk D:
      6. If you get any errors you will need to type: chkdsk D: /f

      I would also check Windows.

      1. Press Win R.
      2. Type :cmd
      3. Press Ctrl Shift Enter to get the admin Command Prompt.
      4. Type: sfc /scannow

      cheers, Paul

      • #2594971

        Thanks for the response.

        I do check my external drive (where these folders are)(non-SSD) and there have been no problems.

        My C: drive is an SSD and it too has no problems.

    • #2595079

      You can “take ownership” of the recalcitrant folders.
      Right click > Properties > Security > Advanced > Owner: Change

      cheers, Paul

    • #2595162

      I don’t know how to get System permission.

      As Paul pointed out you need to take ownership And you then can grant yourself permission with Full control to access and delete the files.  If you are not sure of how to set your permissions in the Security tab of the folder’s Properties you can get the same results with 2 commands in a Command Prompt window.  The attached PDF explains how.

      Override-Access-Denied

      HTH, Dana:))

      1 user thanked author for this post.
      • #2595257

        Thanks for the response.

        I entered the commands you supplied with the following results:

        takeown /f \xxxjunk* /r /d y

        which had the following output

        SUCCESS: The file (or folder): "D:\xxxjunk01" now owned by user "DESKTOP-06BAJDR\USER".
        SUCCESS: The file (or folder): "D:\xxxjunk02" now owned by user "DESKTOP-06BAJDR\USER".
        .
        .
        .
        SUCCESS: The file (or folder): "D:\xxxjunk18" now owned by user "DESKTOP-06BAJDR\USER".

        I should note that after the last message ‘takeown’ seemed to hand and I had to Ctrl-C to get back to the prompt.

        I then entered
        icacls \xxxjunk* /grant administrators:F /T

        which had the following output

        processed file: \xxxjunk01
        processed file: \xxxjunk02
        .
        .
        .
        processed file: \xxxjunk18

        Again I needed to Ctrl-C to get back to the prompt.

        I did a Restart.

        I tried removing 1 folder:

        rd \xxxjunk01 -forc -recu

        with the following result

        Remove-Item: Access to the path 'D:\xxxjunk01\_1\lock' is denied.
        Remove-Item: The directory is not empty. : 'D:\xxxjunk01\_1'
        Remove-Item: Access to the path 'D:\xxxjunk01\_2\lock' is denied.
        Remove-Item: The directory is not empty. : 'D:\xxxjunk01\_2'
        Remove-Item: Access to the path 'D:\xxxjunk01\_3\lock' is denied.
        Remove-Item: The directory is not empty. : 'D:\xxxjunk01\_3'
        Remove-Item: Access to the path 'D:\xxxjunk01\_4\lock' is denied.
        Remove-Item: The directory is not empty. : 'D:\xxxjunk01\_4'
        Remove-Item: The directory is not empty. : 'D:\xxxjunk01'

        I’m not sure what I did wrong.


        Lee

    • #2595341

      I have used the hidden built-in admin account to avoid all the frustration with file and folder permissions.  It might work for you. CAUTION: The built-in admin account permissions you for almost everything. Being careless can hose your OS, so have a full image backup at the ready before activating and using the hidden admin account and deactivate it when you’re done.

      Here’s how to activate/deactivate the built-in hidden admin account.

      From an admin CMD window enter:

      net user administrator /active:yes

      and press enter. Restart your computer. You have an additional user admin acct.

      Sign out of your regular user account and open the now active built-in admin account. From “This PC” go to the location of the files/folders you want to delete, move or alter. If the location is part of your everyday user files, just open “users” in the admin account and in the list, you will find your regular user account. Expand it and go to the location of the files/folders you want to delete, move, or alter. You should have zero permissions issues. If you do, it’s a new one on me.

      When done, remember to deactivate the built-administrators account:

      From a admin CMD window enter:

      net user administrator /active:no

      and press enter. Restart your computer.

      Be careful and I hope this works for you.

      Desktop Asus TUF X299 Mark 1, CPU: Intel Core i7-7820X Skylake-X 8-Core 3.6 GHz, RAM: 32GB, GPU: Nvidia GTX 1050 Ti 4GB. Display: Four 27" 1080p screens 2 over 2 quad.

      • #2595476

        Thanks for response.

        I’m very leery about activating, even for a short time, the hidden Administrator account.

        I’m going to try Dana’s suggestion of DeleteOnBoot.

    • #2595358

      My guess is the “lock” files are in use by something so they can’t be deleted.

      Sysinternals Process Explorer will tell you what has the files open.

      cheers, Paul

      • #2595475

        Thanks for the response.

        I used NirSoft’s OpenFileView and none of the ‘lock’ files are listed.

        I’m going to try DeleteOnBoot recommended by Dana.

    • #2595430

      SUCCESS: The file (or folder): “D:\xxxjunk01” now owned by user “DESKTOP-06BAJDR\USER”. SUCCESS: The file (or folder): “D:\xxxjunk02” now owned by user “DESKTOP-06BAJDR\USER”. . . . SUCCESS: The file (or folder): “D:\xxxjunk18” now owned by user “DESKTOP-06BAJDR\USER”. I should note that after the last message ‘takeown’ seemed to hand and I had to Ctrl-C to get back to the prompt.

      I see you ran the wildcard function for all these files in one command.  Just how many of these files are there and are they files or folders?  The command applies the take ownership to folder and any files in that folder.  The response indicated that some of the files/folders was successful in taking ownership for the “DESKTOP-06BAJDR\USER”.  The hang usually means a file did not respond and the command is still trying.  This could be a file in use or a file requiring a hash tag that it didn’t get.

      Not granting permission points to a lack of inheritance on the permissions.  Again this points to a hash tag mismatch.    Often System files have hash tags matching (think password) to prevent tampering.  These are tougher to delete.

      With these hard to delete files and folders I suggest you use the free Delete On Reboot app which is what I use to delete the very tough files (spyware falls in this category).  You can download your copy from Major Geeks at the link below:

      Delete.On.Reboot 3.29

      HTH, Dana:))

      • #2595473

        Thanks. I’ll download it and try it.

        • #2595481

          Dana’s suggestion of Delete.On.Reboot worked – all the troublesome directories are gone.

          One small nit is that after the logon was finished I was asked to set up some things like I was logging on for the first time. I skipped/ignored all the screens and all seems to be ok.

          Thanks to all for your assistance.


          Lee

    Viewing 6 reply threads
    Reply To: “you require permission from System to make changes to this folder”

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: