Set rights on folders, subfolders and files by commandline

Posted on 2012-09-20
Last Modified: 2012-10-17



I would like to give access to the Jon folder (security) - Give him rights to add folder, subfolders and files to the D:\Users\Jon... But Jon should not be able to delete the Jon folder.

Using icacls? or?

Thanks in advance

Question by:mikeydk
    LVL 14

    Expert Comment

    You should definitely use icacls. If you just run that command without any parameters, it will give you all the possible options and some examples. It will look something like this:
    icacls d:\users\jon /grant jon:(RC,WDAC,WO,S,AS,MA,GR,GW,GE,GA,RD,WD,AD,REA,WEA,X,RA,WA)
    icacls d:\users\jon /grant jon:(DE,DC)

    Open in new window

    The first command basically give him full access without delete permissions, and the second specifically denies those delete permissions

    Author Comment


    How do I set the "Only files and subfolders"? (not only "this folder")

    LVL 14

    Expert Comment

    add the /T switch, which will propagate it into all the subfolders
    LVL 14

    Accepted Solution

    I just wanted to make sure that everything worked to your satisfaction

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Suggested Solutions

    Welcome to my series of short tips on migrations. Whilst based on Microsoft migrations the same principles can be applied to any type of migration. My first tip Migration Tip #1 – Source Server Health can be found listed in my profile here: http:…
    The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
    This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now