News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • File Permissions

    Posted on WSIHipschman Comment on the AskWoody Lounge

    Home Forums AskWoody support Windows Windows 10 Questions: Win10 File Permissions

    • This topic has 8 replies, 6 voices, and was last updated 1 month ago.
    Viewing 9 reply threads
    • Author
      Posts
      • #2303722 Reply
        WSIHipschman
        AskWoody Plus

        I have transferred a number of folders from my old PC to a new one using a backup program. Now, due to permissions issues, I cannot copy them or delete them. I can go to properties/security for each folder and file and first change ownership and then do it again to grant permissions so I can do the copy or delete, but there are hundreds of files. Is there a way change ownership and permissions in batch mode? I tried using the takeown command line utility but can’t seem to find the right syntax to change ownership to my local user account – it always ends up giving ownership to the admin account. Anyone have a suggestion? Thanks.

      • #2303740 Reply
        Rick Corbett
        AskWoody_MVP

        Have a look at this Raymond.CC article – 6 Tools To Take Ownership and Get Full Control Of Files and Folders – not forgetting the comments at the bottom of the article.

        I use the first (registry) method – Take Ownership, whick took but a few seconds to merge to the registry and become available in File Explorer‘s right-click context menu – but any of the others should work for you.

        Take_Ownership_registry

        The last one – which I’ve downloaded but not yet used – seems particularly useful as it’s small, free and portable.

        PS – Post back if you also need a method to bulk ‘unblock’ files that have been transferred from another PC.

        Hope this helps…

        Attachments:
      • #2303729 Reply
        anonymous
        Guest

        For those more in the know about security and permissions than I, would having @WSIHipschman enable the inheritance factor help solve the dilemma of how to quickly be able to change the access permissions to hundreds of files within a folder?

        My idea is for him/her to take ownership of the folder the files are in and then propagate that attribute to the files within the folder through the inheritance factor. My idea uses the GUI, and the items built into the Security tab of the folder’s properties sheet instead of the command line as they have suggested in the original post above.

        @WSIHipschman , for any of this to work, you must be a member of the Administrators group on the computer. If you are only a member of the Users group, you’ll have to log on to the computer as the administrator. For the most part, only Administrators or members of the Administrators group can take ownership of objects such as files and folder.

      • #2304015 Reply
        WSIHipschman
        AskWoody Plus

        Thanks to both of you for the replies.

        Rick, I am a rather cautious person and even though the programs you listed are probably safe, I was hoping to do this without automated registry edits or installing unproven software. If I can’t I will try one of them.

        Anonymous: I just tried that. The inheritance goes for a while and then hits one of several folders where it stops with the error shown in Error.png (attached). If I look at the folder properties I find that it apparently has no owner, i.e. the attempt to have it inherit ownership failed. I can fix the folder manually, but then I still end up having do the same with every file in it. If I fix all those files I just get the same kind of error with another folder. There are too many to do them all manually.

        Attachments:
      • #2304033 Reply
        WSIHipschman
        AskWoody Plus

        Thanks again to both of you for the suggestions. I have been playing more with the on-line properties dialog and have found some short cuts which allow me to force inheritance with  a lot fewer clicks. This will make it feasible to do what I need manually so I’ll just do it that way.

      • #2304035 Reply
        mn–
        AskWoody Lounger

        Well, there’s always the command line and PowerShell. Surely the icacls command is available and we shoudl have people here who can build up a syntax that’ll do what’s needed?

        As admin (from a “run as admin” CMD or PowerShell window or something like that), you should be able to do do something like,

        icacls topleveldir /grant:r Administrators:(OI)(CI)F /T/C/L
        icacls topleveldir /setowner user /T/C/L
        icacls topleveldir /grant user:(OI)CI)F /inheritance:r /T/C/L

        … don’t offhand remember how this went, don’t have a Windows box right now over here 😉 … and icacls syntax is a bit weird.

      • #2304128 Reply
        Paul T
        AskWoody MVP

        TAKEOWN would be a better command line utility.

        takeown /f g:\*.* /r /d Y

        cheers, Paul

      • #2305460 Reply
        Richard Merchant
        AskWoody Plus

        I have a “variation of this theme” problem.   Being old I continue to use Eudora for email and run it on two computers – desktop and laptop.   Desktop I consider the “master” so I regularly “sync” (using Powerdesk FileSync utility) the data folders (no program folders) by copying/overwriting all the ‘newer’ mailbox (*.mbx) and table (*.toc) files.    Oddly the sync process fails on a couple – not all – of the files giving a permissions error.   I can go over to the laptop and ‘take ownership’ of the files, and then the sync process works seamlessly.    But I have to do this repetitively…    And those files are not the only ones changed – just refused.

        Anyone give me a clue why this behavior is happening?

        • files are not protected in any way
        • files are in a public location (not windows protected etc)
        • files are small, txt files in essence

        Thanks

        Richard

        • #2305518 Reply
          PaulK
          AskWoody Lounger

          What are the file types of these couple (is it exactly two?) files? Always the same two?
          What process/program creates them?
          When you go to change the Owner, who is listed as the Current Owner?

          “And those files are not the only ones changed – just refused.”
          – ‘Changed’? – Other files also with different owners, but copy works anyway?

      • #2305624 Reply
        Paul T
        AskWoody MVP

        PowerDesk may be replacing the owner information.
        What user do you run it as?
        Is that the user who owns files you need to fix?

        cheers, Paul

      • #2306661 Reply
        Richard Merchant
        Guest

        Thanks:

        Could PowerDesk be changing file permissions?    I don’t see any reason why – for one reason I’m not actually using the program Powerdesk, which has the capability of doing so, but just one of the utilities associated with it.  (I can’t activate Powerdesk anymore, one of the c****y activation servers keeps rejecting me, but the various utilities bundled with it continue to work so I simply use them independently).

        I’m the same owner and only owner  (notwithstanding the various Windows owners) and I take ownership multiple times as I suggested.  The file is shared with the workgroup, full permissions.  All the other files – 10 or 20 – sync just fine and insofar as Windows is concerned these individual files are no different than any others.

        I’m not 100% sure that they are the same files each time but the message/effect is exactly the same.  The owner permissions to do not look different each time – though why would they?  Eudora itself doesn’t change permissions insofar as I am aware.   And of the files, one is a mailbox file, the other an index file for a different mailbox so there is no logic I see there.

        Richard

    Viewing 9 reply threads

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: File Permissions

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