Generate icacls script of permissionsUseful Command-line Commands on WindowsWindows Filesystem Permissions PuzzleUsing ICACLS to set permissions on user directoriesicacls, Network Service, and setting ACLs on Windows Server 2008Remove SID with ICACLSWindows LocalSystem vs. Systemicacls granting access to all users on windows 7Replace permission entries on all child objects using icaclsicacls: overwrite existing ACL with a DENY ACESetACL not propagating permissions correctly

Why do radiation hardened IC packages often have long leads?

Does a bank have to tell me if a check made out to me was cashed there?

Possible runaway argument using circuitikz

What aircraft was used as Air Force One for the flight between Southampton and Shannon?

Getting UPS Power from One Room to Another

Please figure out this Pan digital Prince

What STL algorithm can determine if exactly one item in a container satisfies a predicate?

Should I put programming books I wrote a few years ago on my resume?

What is this Amiga 1200 mod?

Does the new finding on "reversing a quantum jump mid-flight" rule out any interpretations of QM?

Has there been a multiethnic Star Trek character?

Is there a DSLR/mirorless camera with minimal options like a classic, simple SLR?

Shouldn't Apple consider allowing use of Apple Pencil while it's charging?

Why is long-term living in Almost-Earth causing severe health problems?

How to safely destroy (a large quantity of) valid checks?

If there's something that implicates the president why is there then a national security issue? (John Dowd)

What is the logic behind charging tax _in the form of money_ for owning property when the property does not produce money?

What would prevent chimeras from reproducing with each other?

How can I remove material from this wood beam?

If a Variant Human is Reincarnated, would they lose the feat and skill proficiency they started with?

Why does this query, missing a FROM clause, not error out?

60s or 70s novel about Empire of Man making 1st contact with 1st discovered alien race

The usage of kelvin in formulas

Increase speed altering column on large table to NON NULL



Generate icacls script of permissions


Useful Command-line Commands on WindowsWindows Filesystem Permissions PuzzleUsing ICACLS to set permissions on user directoriesicacls, Network Service, and setting ACLs on Windows Server 2008Remove SID with ICACLSWindows LocalSystem vs. Systemicacls granting access to all users on windows 7Replace permission entries on all child objects using icaclsicacls: overwrite existing ACL with a DENY ACESetACL not propagating permissions correctly






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








2















I am looking for a utility to which I can specify a directory to be recursively scanned. The utility should generate a batch file consisting of calls to icacls to reproduce the file and directory permissions under the specified path.



The icacls /save command is not suitable for this task particularly because it duplicates inherited permissions unnecessarily and it outputs SIDs instead of friendly account names.










share|improve this question






















  • So what do you want to do about inherited permissions then? Should permissions from parents be discarded? Does this also need to handle ownership in any manner?

    – jscott
    Mar 6 '13 at 0:57












  • @jscott, it should emit (OI)(CI) at the directory where the inherited entires are actually defined and the system will take care of the propagation.

    – Jason Kresowaty
    Mar 6 '13 at 2:10











  • So then it walks "up" from the directory provided. But surely you mean it should emit (OI)(CI) only at the directories which inherit "This folder, subfolders, and files", the other inherit modes (OI)(CI)(IO), (CI)(IO), and (OI)(IO) should be handled respectively.

    – jscott
    Mar 6 '13 at 2:48











  • Essentially, it should generate the minimum number of icacls calls to exactly reapply the original permissions. In the case that all entries on a specific directory or file are inherited entries, it should generate no icacls call for that directory or file.

    – Jason Kresowaty
    Mar 6 '13 at 3:01


















2















I am looking for a utility to which I can specify a directory to be recursively scanned. The utility should generate a batch file consisting of calls to icacls to reproduce the file and directory permissions under the specified path.



The icacls /save command is not suitable for this task particularly because it duplicates inherited permissions unnecessarily and it outputs SIDs instead of friendly account names.










share|improve this question






















  • So what do you want to do about inherited permissions then? Should permissions from parents be discarded? Does this also need to handle ownership in any manner?

    – jscott
    Mar 6 '13 at 0:57












  • @jscott, it should emit (OI)(CI) at the directory where the inherited entires are actually defined and the system will take care of the propagation.

    – Jason Kresowaty
    Mar 6 '13 at 2:10











  • So then it walks "up" from the directory provided. But surely you mean it should emit (OI)(CI) only at the directories which inherit "This folder, subfolders, and files", the other inherit modes (OI)(CI)(IO), (CI)(IO), and (OI)(IO) should be handled respectively.

    – jscott
    Mar 6 '13 at 2:48











  • Essentially, it should generate the minimum number of icacls calls to exactly reapply the original permissions. In the case that all entries on a specific directory or file are inherited entries, it should generate no icacls call for that directory or file.

    – Jason Kresowaty
    Mar 6 '13 at 3:01














2












2








2








I am looking for a utility to which I can specify a directory to be recursively scanned. The utility should generate a batch file consisting of calls to icacls to reproduce the file and directory permissions under the specified path.



The icacls /save command is not suitable for this task particularly because it duplicates inherited permissions unnecessarily and it outputs SIDs instead of friendly account names.










share|improve this question














I am looking for a utility to which I can specify a directory to be recursively scanned. The utility should generate a batch file consisting of calls to icacls to reproduce the file and directory permissions under the specified path.



The icacls /save command is not suitable for this task particularly because it duplicates inherited permissions unnecessarily and it outputs SIDs instead of friendly account names.







windows access-control-list






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 6 '13 at 0:52









Jason KresowatyJason Kresowaty

2862520




2862520












  • So what do you want to do about inherited permissions then? Should permissions from parents be discarded? Does this also need to handle ownership in any manner?

    – jscott
    Mar 6 '13 at 0:57












  • @jscott, it should emit (OI)(CI) at the directory where the inherited entires are actually defined and the system will take care of the propagation.

    – Jason Kresowaty
    Mar 6 '13 at 2:10











  • So then it walks "up" from the directory provided. But surely you mean it should emit (OI)(CI) only at the directories which inherit "This folder, subfolders, and files", the other inherit modes (OI)(CI)(IO), (CI)(IO), and (OI)(IO) should be handled respectively.

    – jscott
    Mar 6 '13 at 2:48











  • Essentially, it should generate the minimum number of icacls calls to exactly reapply the original permissions. In the case that all entries on a specific directory or file are inherited entries, it should generate no icacls call for that directory or file.

    – Jason Kresowaty
    Mar 6 '13 at 3:01


















  • So what do you want to do about inherited permissions then? Should permissions from parents be discarded? Does this also need to handle ownership in any manner?

    – jscott
    Mar 6 '13 at 0:57












  • @jscott, it should emit (OI)(CI) at the directory where the inherited entires are actually defined and the system will take care of the propagation.

    – Jason Kresowaty
    Mar 6 '13 at 2:10











  • So then it walks "up" from the directory provided. But surely you mean it should emit (OI)(CI) only at the directories which inherit "This folder, subfolders, and files", the other inherit modes (OI)(CI)(IO), (CI)(IO), and (OI)(IO) should be handled respectively.

    – jscott
    Mar 6 '13 at 2:48











  • Essentially, it should generate the minimum number of icacls calls to exactly reapply the original permissions. In the case that all entries on a specific directory or file are inherited entries, it should generate no icacls call for that directory or file.

    – Jason Kresowaty
    Mar 6 '13 at 3:01

















So what do you want to do about inherited permissions then? Should permissions from parents be discarded? Does this also need to handle ownership in any manner?

– jscott
Mar 6 '13 at 0:57






So what do you want to do about inherited permissions then? Should permissions from parents be discarded? Does this also need to handle ownership in any manner?

– jscott
Mar 6 '13 at 0:57














@jscott, it should emit (OI)(CI) at the directory where the inherited entires are actually defined and the system will take care of the propagation.

– Jason Kresowaty
Mar 6 '13 at 2:10





@jscott, it should emit (OI)(CI) at the directory where the inherited entires are actually defined and the system will take care of the propagation.

– Jason Kresowaty
Mar 6 '13 at 2:10













So then it walks "up" from the directory provided. But surely you mean it should emit (OI)(CI) only at the directories which inherit "This folder, subfolders, and files", the other inherit modes (OI)(CI)(IO), (CI)(IO), and (OI)(IO) should be handled respectively.

– jscott
Mar 6 '13 at 2:48





So then it walks "up" from the directory provided. But surely you mean it should emit (OI)(CI) only at the directories which inherit "This folder, subfolders, and files", the other inherit modes (OI)(CI)(IO), (CI)(IO), and (OI)(IO) should be handled respectively.

– jscott
Mar 6 '13 at 2:48













Essentially, it should generate the minimum number of icacls calls to exactly reapply the original permissions. In the case that all entries on a specific directory or file are inherited entries, it should generate no icacls call for that directory or file.

– Jason Kresowaty
Mar 6 '13 at 3:01






Essentially, it should generate the minimum number of icacls calls to exactly reapply the original permissions. In the case that all entries on a specific directory or file are inherited entries, it should generate no icacls call for that directory or file.

– Jason Kresowaty
Mar 6 '13 at 3:01











1 Answer
1






active

oldest

votes


















0














If I understand you correctly, you want to apply the perms of a directory to it's children?
you can use powershell scripts for this. You can recursively scan directorys, and for each directory you can act on it, for example



Get-ChildItem C:usersmedesktop -Recurse -Attributes Directory | foreach Tee-Object C:acls.list 


will recurse all directories in my desktop and output the permissions to the console and also to a file called C:acls.list. You can also change ownership info, apply perms recursively, and pretty much whatever icalcs would do using get-acl and set-acl






share|improve this answer























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "2"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f485067%2fgenerate-icacls-script-of-permissions%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    If I understand you correctly, you want to apply the perms of a directory to it's children?
    you can use powershell scripts for this. You can recursively scan directorys, and for each directory you can act on it, for example



    Get-ChildItem C:usersmedesktop -Recurse -Attributes Directory | foreach Tee-Object C:acls.list 


    will recurse all directories in my desktop and output the permissions to the console and also to a file called C:acls.list. You can also change ownership info, apply perms recursively, and pretty much whatever icalcs would do using get-acl and set-acl






    share|improve this answer



























      0














      If I understand you correctly, you want to apply the perms of a directory to it's children?
      you can use powershell scripts for this. You can recursively scan directorys, and for each directory you can act on it, for example



      Get-ChildItem C:usersmedesktop -Recurse -Attributes Directory | foreach Tee-Object C:acls.list 


      will recurse all directories in my desktop and output the permissions to the console and also to a file called C:acls.list. You can also change ownership info, apply perms recursively, and pretty much whatever icalcs would do using get-acl and set-acl






      share|improve this answer

























        0












        0








        0







        If I understand you correctly, you want to apply the perms of a directory to it's children?
        you can use powershell scripts for this. You can recursively scan directorys, and for each directory you can act on it, for example



        Get-ChildItem C:usersmedesktop -Recurse -Attributes Directory | foreach Tee-Object C:acls.list 


        will recurse all directories in my desktop and output the permissions to the console and also to a file called C:acls.list. You can also change ownership info, apply perms recursively, and pretty much whatever icalcs would do using get-acl and set-acl






        share|improve this answer













        If I understand you correctly, you want to apply the perms of a directory to it's children?
        you can use powershell scripts for this. You can recursively scan directorys, and for each directory you can act on it, for example



        Get-ChildItem C:usersmedesktop -Recurse -Attributes Directory | foreach Tee-Object C:acls.list 


        will recurse all directories in my desktop and output the permissions to the console and also to a file called C:acls.list. You can also change ownership info, apply perms recursively, and pretty much whatever icalcs would do using get-acl and set-acl







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 6 '13 at 1:36









        MDMoore313MDMoore313

        4,69152870




        4,69152870



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Server Fault!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f485067%2fgenerate-icacls-script-of-permissions%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

            What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

            Esgonzo ibérico Índice Descrición Distribución Hábitat Ameazas Notas Véxase tamén "Acerca dos nomes dos anfibios e réptiles galegos""Chalcides bedriagai"Chalcides bedriagai en Carrascal, L. M. Salvador, A. (Eds). Enciclopedia virtual de los vertebrados españoles. Museo Nacional de Ciencias Naturales, Madrid. España.Fotos